Background
Sow removal continues to be both economically and ethically an important issue. To implement preventive measures the demographic, management and housing factors behind suboptimal culling and mortality proportions should be understood better.
Objective
This study aimed to firstly, describe current management and housing in Finnish piglet producing farms and secondly, to establish associations between an extensive list of farm characteristics, housing conditions, management practices and on farm mortality (euthanasia and unassisted death) in a sample of Finnish commercial sow farms.
Materials and methods
Client farms from the three largest slaughterhouse companies in Finland were included either voluntary (n=12) or after being convenience-sampled (n=31). Cross-sectional type of study using questionnaire survey and field visit was carried out between February and October 2014. To additionally determine annual mortality percentages for each farm data from the National Swine Herd Register were obtained. Multiple correspondence analysis (MCA) was applied to identify complex underlying typologies based on all the collected categorical variables. The variables representing sow mortality were added as supplementary variables to interpret their relationship with farm descriptors. Wilcoxon rank sum test was used to compare the farm groups located in different parts of the generated graphs.
Results
The result from multiple correspondence analysis shows that there is association between high alcohol usage and social and demographic features. There are individuals which share both high frequency of high alcohol consumptions and high frequencies for one or more class failures, lowest performance with regard to final grade, no willingness to higher eduction, older age, guardian being other than mother or father and going out frequently. In addition, they share a low frequency for mother´s and father´s higher eduction. Surprisingly, good health status defined by the respondent him or herself was quite frequent among the group members having high alcohol usage in common.
The first three MCA dimensions explained almost 33% of the variability among the farms. Number of sows per worker, farm size, pest control features, use of bedding, rooting and nesting materials, amount of solid floor and managing all-in-all-out in the farrowing unit, feeding systems and the levels of parturition induction and oxytocin use contributed to the inertia of the first factorial axis (F1). In addition, the coordinates representing different percentages of mortality shifted progressively along the F1 towards the more positive side. The distribution of the groups of farms with negative and positive coordinates for F1 differed for mortality (mean 7.4/11.9, p<0.05).
Conclusion
There is an indication that some sociodemographic factors have joint effects. It is important to confirm the associations using advanced techniques, e.g. by applying theory of planned behavior to study the relations among personal beliefs, attitudes, behavioral intentions and behaviour and other individual as well as parental features to investigate the risk factors for high alcohol usage.
This study indicates the need to consider potential factor combinations instead of individual risk factors to control sow on farm mortality.This study indicates the need to consider potential factor combinations instead of individual risk factors to control sow on farm mortality.
Data including grades, demographic, social and school related features were collected in two Portuguese schools using school reports and questionnaires and stored as two separate datasets regarding performance in distinct subjects, namely Mathematics and Portuguese. The original data of the analysis in this study are freely available as a zip file with metadata.For the purpose of this study the datasets were joined and edited according to this R script. The variables not used for joining the two data sets were combined by averaging them. Variables were further categorized to decrease the total amount of variable categories. This approach simultanously decreases the amount of information, but, on the other hand facilitates interpreation of the results. Instead of using labels for the created categories the exact ranges were used to facilitate the interpretation. In addition, a binary Alcohol_use was created by using two separate five scaled (very low-very high) variables, namely alcohol use on weekdays and during weekends. A treshold value of more than low (2) was choses for the high alcohol usage either on weekdays or on weekends.Furthermore, the variables were renamed to ease and clarify the graphical display of the results.
Data are loaded. The final data set includes 434 respondents and 19 factorial and one supplementary, quantitative variable. The names of the variables and their explanations are listed below.
med<-read.csv(file="medyhd22mca.csv",header=TRUE)
mediso<-read.csv(file="medyhdiso.csv",header=TRUE)
tilat<-read.csv(file="3006masterfile.csv",header=TRUE)
tilat<-tilat[1:43,]
med<-med%>%mutate_all(as.factor)
#med$OUT_SOW_cullproNUM
#colnames(med)=="OUT_SOW_cullproNUM"
#colnames(med)=="OUT_SOWmortpro"
med$OUT_SOW_cull_proNUM<-as.numeric(med$OUT_SOW_cull_proNUM)
med$OUT_SOW_mort_proNUM<-as.numeric(med$OUT_SOW_mort_proNUM)
mediso$OUT_SOW_cull_proNUM<-as.numeric(med$OUT_SOW_cull_proNUM)
mediso$OUT_SOW_mort_proNUM<-as.numeric(med$OUT_SOW_mort_proNUM)
mediso$OUT_SOW_cull_dic<-as.factor(med$OUT_SOW_cull_dic)
mediso$OUT_SOW_mort_dic<-as.factor(med$OUT_SOW_mort_dic)
medcat<-med %>% select(-ends_with("NUM_NO"),-ends_with("dosage_NO"),-ends_with("NUM"))
#medcat<-medcat%>%mutate_all(as.factor)
mednum<-med %>% select(ends_with("NUM_NO"),(ends_with("dosage_NO")),(ends_with("NUM")))
#mednum<-mednum%>%mutate_all(as.numeric)
medmca<-medcat
medmca$OUT_SOW_mort_proNUM<-as.numeric(med$OUT_SOW_mort_proNUM)
medmca$OUT_SOW_cull_proNUM<-as.numeric(med$OUT_SOW_cull_proNUM)
dfalc<-medmca
#Label<-as.matrix(colnames(dfalc))
#Variable<-c("Gender", "Age categorized", "Parent's cohabitation status","Mother´s educational status categorized (less than secondary education, secondary education, higher education", "Father´s educational status categorized (less than secondary education, secondary education, higher education", "Mother´s job (teacher, health care, civil services, at home, other)", "Father´s job (teacher, health care, civil services, at home, other)", "Student´s guardian: mother, father, other", "Family educational support", "Willingness to take higher education", "Relationship", "Extra-cullicular activities", "Familial relationships categorized (very bad to bad, average, good to excellent)","Going out with friends categorized (very low or low, average, high or very high)","Health status categorized (very bad to bad, average, good to very good)", "Amount of failed classes: none/more than one)", "Amount of school absences one or less, 2-6hours, more than 6 hours", "Final grade categorized by quartiles", "Final grade", "Alcohol consumption more than two either during the week or at weekends")
#Level<-as.matrix(dfalc %>% sapply(levels))
#om<- data.frame(Label,Variable,Level)
#om$Level[3]<-"A(Alone),T(Together)"
#om$Level[19]<-"numeric from 0 to 20"
#rownames(om)<-NULL
#kable(om, title="Basic elements of the dataset","html") %>%
# kable_styling(bootstrap_options = "striped", full_width = F)
Firstly, a detailed variable summary is presented. Thereafter, summary tables are created using two different strata: median mortality and culling. Finally, the variables are visualized by barplots stratified by mortality and culling to capture interesting relations.
library(settings)
mediso$OUT_SOW_cull_proNUM<-as.numeric(med$OUT_SOW_cull_proNUM)
mediso$OUT_SOW_mort_proNUM<-as.numeric(med$OUT_SOW_mort_proNUM)
mediso$R_PR_sowsinsection_NUM<-tilat$R_PR_sowsinsecNUM_NO
mediso$BASIC_size_pigs_NUM<-tilat$BASIC_SIZE_PigsNUM
mediso$BASIC_size_sows_NUM<-tilat$BASIC_SIZE_Sows_NUM
mediso$BASIC_STRESSLEVEL_verymucherpal_some_NUM<-tilat$BASIC_STRESSLEVEL_verymucherpal_some
mediso$M_farNSAIDS100_NUM<-tilat$M_farNSAIDS100_NUM
mediso$M_farAB100_NUM<-tilat$M_farAB100_NUM
mediso$M_pregAB100_NUM<-tilat$M_pregAB100_NUM
mediso$MG_BR_animdirt_NUM<-tilat$MG_BR_dirt_NUM_NO
mediso$MG_BR_artinspro_NUM<- tilat$INS_artinsproNUM
mediso$R_BR_floorsolid_NUM<-tilat$R_BR_floorsolid_NUM_NO
mediso$MG_PR_animalsdirty_NUM<-tilat$MG_PR_dirt_NUM_NO
mediso$R_PR_sowgroups_NUM<-tilat$R_PR_sowsNUM_NO
mediso$R_PR_areapersow_NUM<-tilat$R_PR_areapersow_NUM_NO
mediso$R_PR_dirtypens_NUM <-tilat$R_PR_dirtNUM_NO
mediso$R_PR_floorsolid_NUM<-tilat$R_PR_floorsolidNUM_NO
mediso$MG_FAR_oxuseper10farrowings_NUM<-tilat$M_OX_10far_NUM_NO
mediso$R_FAR_pensize_NUM<-tilat$R_FARpenNUM_NO
mediso$R_FAR_dirtypens_NUM<-tilat$MG_FAR_dirt_NUM_NO
mediso$R_FAR_floorsolid_NUM<-tilat$R_FAR_floorsolid_all0_100_100_2_muu1
mediso$MG_sows_perworker_NUM<-tilat$MG_SOWSperworkeredit_57_113_147_NUM_NO
mediso$BASIC_edulevel<-tilat$BASIC_edulevel
medcati<-mediso %>% select(-ends_with("NUM_NO"),-ends_with("dosage_NO"),-ends_with("NUM"))
medcati<-medcati%>%mutate_all(as.factor)
mednumi<-mediso %>% select(ends_with("NUM_NO"),(ends_with("dosage_NO")),(ends_with("NUM")))
mednumi<-mednum%>%mutate_all(as.numeric)
reset(options)
options("scipen"=10, "digits"=2)
tab1<-CreateTableOne(vars=colnames(mediso) ,data=mediso,factorVars = colnames(medcati))
summary(tab1)
##
## ### Summary of continuous variables ###
##
## strata: Overall
## n miss p.miss mean sd median p25 p75 min
## OUT_SOW_cull_proNUM 43 0 0 12.9 7.4 12.0 6.5 18 1
## OUT_SOW_mort_proNUM 43 0 0 21.0 12.5 21.0 10.5 32 1
## R_PR_sowsinsection_NUM 43 0 0 127.0 129.0 80.0 49.0 152 10
## BASIC_size_pigs_NUM 43 0 0 381.5 735.8 40.0 0.0 390 0
## BASIC_size_sows_NUM 43 0 0 428.8 424.5 270.0 102.5 635 37
## M_farNSAIDS100_NUM 43 2 5 27.9 35.3 10.0 2.5 40 0
## M_farAB100_NUM 43 2 5 9.0 16.1 5.0 1.0 10 0
## M_pregAB100_NUM 43 2 5 0.8 1.6 0.5 0.0 1 0
## MG_BR_animdirt_NUM 43 4 9 16.7 23.3 10.0 0.0 20 0
## MG_BR_artinspro_NUM 43 0 0 93.8 17.4 100.0 98.0 100 20
## R_BR_floorsolid_NUM 43 0 0 80.1 12.0 80.0 75.0 82 50
## MG_PR_animalsdirty_NUM 43 0 0 24.2 20.8 20.0 10.0 30 0
## R_PR_sowgroups_NUM 43 0 0 16.0 18.1 10.0 7.0 17 2
## R_PR_areapersow_NUM 43 0 0 3.2 0.9 3.1 2.6 4 1
## R_PR_dirtypens_NUM 43 4 9 21.8 28.0 10.0 0.0 20 0
## R_PR_floorsolid_NUM 43 0 0 72.5 22.3 70.0 60.0 100 20
## R_FAR_pensize_NUM 43 0 0 5.3 1.2 4.9 4.6 5 4
## R_FAR_dirtypens_NUM 43 0 0 15.6 17.2 10.0 0.0 20 0
## R_FAR_floorsolid_NUM 43 0 0 0.8 0.6 1.0 0.5 1 0
## MG_sows_perworker_NUM 43 0 0 119.6 84.1 113.3 56.7 147 11
## max skew kurt
## OUT_SOW_cull_proNUM 27 0.185 -1.08
## OUT_SOW_mort_proNUM 42 0.010 -1.21
## R_PR_sowsinsection_NUM 600 2.062 4.43
## BASIC_size_pigs_NUM 3000 2.648 6.68
## BASIC_size_sows_NUM 2100 1.758 4.33
## M_farNSAIDS100_NUM 100 1.307 0.24
## M_farAB100_NUM 100 4.775 26.44
## M_pregAB100_NUM 10 4.840 27.33
## MG_BR_animdirt_NUM 100 2.447 7.01
## MG_BR_artinspro_NUM 100 -3.816 14.61
## R_BR_floorsolid_NUM 100 -0.176 0.43
## MG_PR_animalsdirty_NUM 80 1.447 1.91
## R_PR_sowgroups_NUM 100 3.350 12.60
## R_PR_areapersow_NUM 6 0.695 0.22
## R_PR_dirtypens_NUM 100 1.847 2.58
## R_PR_floorsolid_NUM 100 -0.478 -0.13
## R_FAR_pensize_NUM 9 1.942 3.77
## R_FAR_dirtypens_NUM 80 1.583 3.49
## R_FAR_floorsolid_NUM 2 -0.006 -0.01
## MG_sows_perworker_NUM 395 1.527 3.03
##
## =======================================================================================
##
## ### Summary of categorical variables ###
##
## strata: Overall
## var n miss p.miss
## MG_R_PR_sowsinsection 43 0 0.0
##
##
##
## B_Biosecused 43 0 0.0
##
##
## B_birds 43 0 0.0
##
##
##
## B_MG_R_FR_allinallout 43 0 0.0
##
##
## B_MG_R_FR_desinf 43 0 0.0
##
##
## B_MG_R_FR_empty 43 0 0.0
##
##
## B_MG_R_FR_wash 43 0 0.0
##
##
## B_MG_R_FR_washmittel 43 0 0.0
##
##
## B_MG_R_PR_allinallout 43 0 0.0
##
##
## B_MG_R_PR_desinf 43 0 0.0
##
##
## B_MG_R_PR_separate 43 0 0.0
##
##
## B_MG_R_PR_wash 43 0 0.0
##
##
## B_pestcontrol 43 0 0.0
##
##
##
##
##
##
##
##
##
##
##
## B_pestcontrolplan 43 0 0.0
##
##
## B_pestsigns 43 0 0.0
##
##
## B_pets_in 43 0 0.0
##
##
## B_V_sirco 43 0 0.0
##
##
## BASIC_edulevel 43 0 0.0
##
##
##
##
## BASIC_Interviewed 43 0 0.0
##
##
##
## BASIC_size_pigs 43 0 0.0
##
##
##
## BASIC_size_sows 43 0 0.0
##
##
##
## BASIC_STRESSLEVEL_verymucherpal_some 43 0 0.0
##
##
## BASIC_Type 43 0 0.0
##
##
## M_farNSAIDS100 43 0 0.0
##
##
## M_fever 43 0 0.0
##
##
## M_lame 43 0 0.0
##
##
## M_pregAB100 43 0 0.0
##
##
## M_rAB 43 0 0.0
##
##
## M_rIND 43 0 0.0
##
##
## M_rOX 43 0 0.0
##
##
## M_secr 43 0 0.0
##
##
## M_farAB100 43 0 0.0
##
##
## M_injury 43 0 0.0
##
##
## M_OX_obstex_preox 43 0 0.0
##
##
##
## M_pregNSAIDS100 43 0 0.0
##
##
## MG_BR_animdirtmed 43 0 0.0
##
##
## MG_BR_artinspro_050_5099_100 43 0 0.0
##
##
##
## MG_BR_bedmatamount_no_alot_enough_some 43 0 0.0
##
##
##
## MG_BR_calm 43 0 0.0
##
##
## MG_BR_feedclean 43 0 0.0
##
##
## MG_BR_feedtype 43 0 0.0
##
##
##
## MG_BR_nopregus 43 0 0.0
##
##
##
## MG_BR_ster 43 0 0.0
##
##
## R_BR_floorsolid_0981_2 43 0 0.0
##
##
## R_BR_kuivaliete 43 0 0.0
##
##
## R_BR_PREGsame 43 0 0.0
##
##
## R_BR_sowspersection 43 0 0.0
##
##
##
##
## MG_PR_animdirtmed 43 0 0.0
##
##
## MG_PR_bedmatamount_no_alot_enough_some 43 0 0.0
##
##
##
## MG_PR_feed_liq_solid 43 0 0.0
##
##
##
##
##
##
## MG_PR_feedtimes 43 0 0.0
##
##
## MG_PR_kuivaliete 43 0 0.0
##
##
## MG_PR_rootamount_no_alot_some 43 0 0.0
##
##
##
## MG_PR_type 43 0 0.0
##
##
##
##
## MG_R_PR_sowgroups 43 0 0.0
##
##
## MG_R_PR_sowsincratespostmix 43 0 0.0
##
##
## R_PR_areapersow 43 0 0.0
##
##
##
## R_PR_dirtmed 43 0 0.0
##
##
## R_PR_floorsolid_0791_2 43 0 0.0
##
##
## MG_FAR_ox 43 0 0.0
##
##
##
## R_FAR_pensize 43 0 0.0
##
##
## MG_FAR_bedamount 43 0 0.0
##
##
##
## MG_FAR_dirtmed 43 0 0.0
##
##
## MG_FAR_feedtimes 43 0 0.0
##
##
## MG_FAR_ind_0no_1rout_2sometimes 43 0 0.0
##
##
##
## MG_FAR_nestmatamount 43 0 0.0
##
##
##
## MG_FAR_rootamount 43 0 0.0
##
##
##
## MG_FAR_toy 43 0 0.0
##
##
## R_FAR_floorsolid_all0_100_100_2_muu1 43 0 0.0
##
##
##
## R_FAR_noise 43 0 0.0
##
##
## V_ery 43 0 0.0
##
##
## MG_sickpen_yn 43 0 0.0
##
##
## MG_SOWS_perworkeredit_57_113_147_ 43 0 0.0
##
##
##
##
## V_parvo 43 0 0.0
##
##
## V_coli 43 0 0.0
##
##
##
## V_ClC 43 0 0.0
##
##
## V_ClA 43 0 0.0
##
## V_SI 43 0 0.0
##
##
## V_APP 43 0 0.0
##
##
## OUT_SOW_cull_dic 43 0 0.0
##
##
## OUT_SOW_mort_dic 43 0 0.0
##
##
## BASIC_STRESSLEVEL_verymucherpal_some_NUM 43 0 0.0
##
##
##
##
##
## MG_FAR_oxuseper10farrowings_NUM 43 0 0.0
##
##
##
##
##
##
##
##
##
##
##
##
##
## level freq percent cum.percent
## (-Inf,49] 11 25.6 25.6
## (151, Inf] 11 25.6 51.2
## (49,151] 21 48.8 100.0
##
## 0 22 51.2 51.2
## 1 21 48.8 100.0
##
## no 31 72.1 72.1
## no 1 2.3 74.4
## yes 11 25.6 100.0
##
## 0 25 58.1 58.1
## 1 18 41.9 100.0
##
## no 11 25.6 25.6
## yes 32 74.4 100.0
##
## 0 17 39.5 39.5
## 1 26 60.5 100.0
##
## 0 10 23.3 23.3
## 1 33 76.7 100.0
##
## 0 33 76.7 76.7
## 1 10 23.3 100.0
##
## 0 36 83.7 83.7
## 1 7 16.3 100.0
##
## no 35 81.4 81.4
## yes 8 18.6 100.0
##
## 0 13 30.2 30.2
## 1 30 69.8 100.0
##
## 0 37 86.0 86.0
## 1 6 14.0 100.0
##
## catdogpois 1 2.3 2.3
## catdogpoistrap 1 2.3 4.7
## catdogpoistrapfirm 1 2.3 7.0
## catpois 10 23.3 30.2
## catpoisother 1 2.3 32.6
## catpoistrap 5 11.6 44.2
## catpoistrapother 1 2.3 46.5
## nothing 1 2.3 48.8
## pois 13 30.2 79.1
## poistrap 8 18.6 97.7
## trap 1 2.3 100.0
##
## no 36 83.7 83.7
## yes 7 16.3 100.0
##
## no 12 27.9 27.9
## yes 31 72.1 100.0
##
## no 32 74.4 74.4
## yes 11 25.6 100.0
##
## 0 30 69.8 69.8
## 1 13 30.2 100.0
##
## 2 6 14.0 14.0
## 3 26 60.5 74.4
## 4 7 16.3 90.7
## 5 4 9.3 100.0
##
## 1 11 25.6 25.6
## 2 27 62.8 88.4
## 3 5 11.6 100.0
##
## (-Inf,0] 12 27.9 27.9
## (0,390] 20 46.5 74.4
## (390, Inf] 11 25.6 100.0
##
## (-Inf,102] 11 25.6 25.6
## (102,635] 21 48.8 74.4
## (635, Inf] 11 25.6 100.0
##
## average 29 67.4 67.4
## verymuch 14 32.6 100.0
##
## int 21 48.8 48.8
## piglet 22 51.2 100.0
##
## 1 24 55.8 55.8
## 2 19 44.2 100.0
##
## 0 37 86.0 86.0
## 1 6 14.0 100.0
##
## 0 12 27.9 27.9
## 1 31 72.1 100.0
##
## 1 28 65.1 65.1
## 2 15 34.9 100.0
##
## 0 37 86.0 86.0
## 1 6 14.0 100.0
##
## 0 39 90.7 90.7
## 1 4 9.3 100.0
##
## 0 26 60.5 60.5
## 1 17 39.5 100.0
##
## 0 38 88.4 88.4
## 1 5 11.6 100.0
##
## 1 24 55.8 55.8
## 2 19 44.2 100.0
##
## 0 27 62.8 62.8
## 1 16 37.2 100.0
##
## 0 26 60.5 60.5
## 1 16 37.2 97.7
## noinfo 1 2.3 100.0
##
## 1 30 69.8 69.8
## 2 13 30.2 100.0
##
## 1 25 58.1 58.1
## 2 18 41.9 100.0
##
## 0 2 4.7 4.7
## 1 13 30.2 34.9
## 2 28 65.1 100.0
##
## ALOT 6 14.0 14.0
## niu 19 44.2 58.1
## no 18 41.9 100.0
##
## 1 40 93.0 93.0
## 2 3 7.0 100.0
##
## 0 35 81.4 81.4
## 1 8 18.6 100.0
##
## crate_L 36 83.7 83.7
## kiosk 1 2.3 86.0
## trough 6 14.0 100.0
##
## 1 13 30.2 30.2
## 2 23 53.5 83.7
## 3 7 16.3 100.0
##
## 0 37 86.0 86.0
## 1 6 14.0 100.0
##
## 1 36 83.7 83.7
## 2 7 16.3 100.0
##
## 2 30 69.8 69.8
## 12 13 30.2 100.0
##
## 0 31 72.1 72.1
## 1 12 27.9 100.0
##
## <20 3 7.0 7.0
## 20-50 11 25.6 32.6
## 50-100 24 55.8 88.4
## all 5 11.6 100.0
##
## 1 28 65.1 65.1
## 2 15 34.9 100.0
##
## 0 13 30.2 30.2
## ALOT 13 30.2 60.5
## NIU 17 39.5 100.0
##
## 3 7.0 7.0
## liq 24 55.8 62.8
## liqsol 3 7.0 69.8
## sol 11 25.6 95.3
## solid 1 2.3 97.7
## solliq 1 2.3 100.0
##
## 2 38 88.4 88.4
## 3 5 11.6 100.0
##
## 2 26 60.5 60.5
## 12 17 39.5 100.0
##
## 0 7 16.3 16.3
## ALOT 16 37.2 53.5
## HIE 20 46.5 100.0
##
## loose 3 7.0 7.0
## pen 16 37.2 44.2
## pen_stall 3 7.0 51.2
## pen_stallL 21 48.8 100.0
##
## (-Inf,10] 23 53.5 53.5
## (10, Inf] 20 46.5 100.0
##
## 0 33 76.7 76.7
## 1 10 23.3 100.0
##
## (-Inf,3] 20 46.5 46.5
## (3,3.7] 12 27.9 74.4
## (3.7, Inf] 11 25.6 100.0
##
## 1 24 55.8 55.8
## 2 19 44.2 100.0
##
## 1 26 60.5 60.5
## 2 17 39.5 100.0
##
## (-Inf,3] 17 39.5 39.5
## (3,7] 18 41.9 81.4
## (7, Inf] 8 18.6 100.0
##
## (-Inf,5.25] 31 72.1 72.1
## (5.25, Inf] 12 27.9 100.0
##
## 0 27 62.8 62.8
## 1 5 11.6 74.4
## 2 11 25.6 100.0
##
## 1 24 55.8 55.8
## 2 19 44.2 100.0
##
## 2 6 14.0 14.0
## 3 37 86.0 100.0
##
## 0 17 39.5 39.5
## 1 4 9.3 48.8
## 2 22 51.2 100.0
##
## 0 15 34.9 34.9
## 1 4 9.3 44.2
## 2 24 55.8 100.0
##
## 0 5 11.6 11.6
## 1 6 14.0 25.6
## 2 32 74.4 100.0
##
## no 20 46.5 46.5
## yes 23 53.5 100.0
##
## 0 11 25.6 25.6
## 1 28 65.1 90.7
## 2 4 9.3 100.0
##
## 0 24 55.8 55.8
## 1 19 44.2 100.0
##
## 1 42 97.7 97.7
## 2 1 2.3 100.0
##
## 0 10 23.3 23.3
## 1 33 76.7 100.0
##
## 1 12 27.9 27.9
## 2 10 23.3 51.2
## 3 12 27.9 79.1
## 4 9 20.9 100.0
##
## 1 42 97.7 97.7
## 2 1 2.3 100.0
##
## 0 2 4.7 4.7
## 1 38 88.4 93.0
## 2 3 7.0 100.0
##
## 0 40 93.0 93.0
## 1 3 7.0 100.0
##
## 0 43 100.0 100.0
##
## 0 39 90.7 90.7
## 1 4 9.3 100.0
##
## 0 38 88.4 88.4
## 1 5 11.6 100.0
##
## 0 22 51.2 51.2
## 1 21 48.8 100.0
##
## 0 21 48.8 48.8
## 1 22 51.2 100.0
##
## 0 0.0 0.0
## average 13 30.2 30.2
## much 8 18.6 48.8
## some 16 37.2 86.0
## verymuch 6 14.0 100.0
##
## 0 0.0 0.0
## 0 1 2.3 2.3
## 1 6 14.0 16.3
## 10 10 23.3 39.5
## 2 6 14.0 53.5
## 3 6 14.0 67.4
## 4 2 4.7 72.1
## 5 3 7.0 79.1
## 6 1 2.3 81.4
## 7 2 4.7 86.0
## 8 1 2.3 88.4
## 9 4 9.3 97.7
## noinfo 1 2.3 100.0
##
reset(options)
| 0 | 1 | p | test | |
|---|---|---|---|---|
| n | 21 | 22 | ||
| MG_R_PR_sowsinsection (%) | 0.011 | |||
| (-Inf,49] | 9 ( 42.9) | 2 ( 9.1) | ||
| (151, Inf] | 2 ( 9.5) | 9 ( 40.9) | ||
| (49,151] | 10 ( 47.6) | 11 ( 50.0) | ||
| B_Biosecused = 1 (%) | 8 ( 38.1) | 13 ( 59.1) | 0.284 | |
| B_birds (%) | 0.577 | |||
| no | 15 ( 71.4) | 16 ( 72.7) | ||
| no | 1 ( 4.8) | 0 ( 0.0) | ||
| yes | 5 ( 23.8) | 6 ( 27.3) | ||
| B_MG_R_FR_allinallout = 1 (%) | 9 ( 42.9) | 9 ( 40.9) | 1.000 | |
| B_MG_R_FR_desinf = yes (%) | 14 ( 66.7) | 18 ( 81.8) | 0.430 | |
| B_MG_R_FR_empty = 1 (%) | 10 ( 47.6) | 16 ( 72.7) | 0.170 | |
| B_MG_R_FR_wash = 1 (%) | 15 ( 71.4) | 18 ( 81.8) | 0.656 | |
| B_MG_R_FR_washmittel = 1 (%) | 4 ( 19.0) | 6 ( 27.3) | 0.782 | |
| B_MG_R_PR_allinallout = 1 (%) | 3 ( 14.3) | 4 ( 18.2) | 1.000 | |
| B_MG_R_PR_desinf = yes (%) | 5 ( 23.8) | 3 ( 13.6) | 0.642 | |
| B_MG_R_PR_separate = 1 (%) | 15 ( 71.4) | 15 ( 68.2) | 1.000 | |
| B_MG_R_PR_wash = 1 (%) | 4 ( 19.0) | 2 ( 9.1) | 0.616 | |
| B_pestcontrol (%) | 0.338 | |||
| catdogpois | 0 ( 0.0) | 1 ( 4.5) | ||
| catdogpoistrap | 1 ( 4.8) | 0 ( 0.0) | ||
| catdogpoistrapfirm | 1 ( 4.8) | 0 ( 0.0) | ||
| catpois | 6 ( 28.6) | 4 ( 18.2) | ||
| catpoisother | 0 ( 0.0) | 1 ( 4.5) | ||
| catpoistrap | 4 ( 19.0) | 1 ( 4.5) | ||
| catpoistrapother | 1 ( 4.8) | 0 ( 0.0) | ||
| nothing | 0 ( 0.0) | 1 ( 4.5) | ||
| pois | 6 ( 28.6) | 7 ( 31.8) | ||
| poistrap | 2 ( 9.5) | 6 ( 27.3) | ||
| trap | 0 ( 0.0) | 1 ( 4.5) | ||
| B_pestcontrolplan = yes (%) | 2 ( 9.5) | 5 ( 22.7) | 0.448 | |
| B_pestsigns = yes (%) | 16 ( 76.2) | 15 ( 68.2) | 0.806 | |
| B_pets_in = yes (%) | 6 ( 28.6) | 5 ( 22.7) | 0.929 | |
| B_V_sirco = 1 (%) | 6 ( 28.6) | 7 ( 31.8) | 1.000 | |
| BASIC_edulevel (%) | 0.585 | |||
| 2 | 4 ( 19.0) | 2 ( 9.1) | ||
| 3 | 12 ( 57.1) | 14 ( 63.6) | ||
| 4 | 4 ( 19.0) | 3 ( 13.6) | ||
| 5 | 1 ( 4.8) | 3 ( 13.6) | ||
| BASIC_Interviewed (%) | 0.515 | |||
| 1 | 4 ( 19.0) | 7 ( 31.8) | ||
| 2 | 15 ( 71.4) | 12 ( 54.5) | ||
| 3 | 2 ( 9.5) | 3 ( 13.6) | ||
| BASIC_size_pigs (%) | 0.144 | |||
| (-Inf,0] | 3 ( 14.3) | 9 ( 40.9) | ||
| (0,390] | 12 ( 57.1) | 8 ( 36.4) | ||
| (390, Inf] | 6 ( 28.6) | 5 ( 22.7) | ||
| BASIC_size_sows (%) | 0.034 | |||
| (-Inf,102] | 8 ( 38.1) | 3 ( 13.6) | ||
| (102,635] | 11 ( 52.4) | 10 ( 45.5) | ||
| (635, Inf] | 2 ( 9.5) | 9 ( 40.9) | ||
| BASIC_STRESSLEVEL_verymucherpal_some = verymuch (%) | 7 ( 33.3) | 7 ( 31.8) | 1.000 | |
| BASIC_Type = piglet (%) | 9 ( 42.9) | 13 ( 59.1) | 0.448 | |
| M_farNSAIDS100 = 2 (%) | 10 ( 47.6) | 9 ( 40.9) | 0.892 | |
| M_fever = 1 (%) | 2 ( 9.5) | 4 ( 18.2) | 0.705 | |
| M_lame = 1 (%) | 14 ( 66.7) | 17 ( 77.3) | 0.664 | |
| M_pregAB100 = 2 (%) | 7 ( 33.3) | 8 ( 36.4) | 1.000 | |
| M_rAB = 1 (%) | 2 ( 9.5) | 4 ( 18.2) | 0.705 | |
| M_rIND = 1 (%) | 0 ( 0.0) | 4 ( 18.2) | 0.127 | |
| M_rOX = 1 (%) | 8 ( 38.1) | 9 ( 40.9) | 1.000 | |
| M_secr = 1 (%) | 2 ( 9.5) | 3 ( 13.6) | 1.000 | |
| M_farAB100 = 2 (%) | 10 ( 47.6) | 9 ( 40.9) | 0.892 | |
| M_injury = 1 (%) | 10 ( 47.6) | 6 ( 27.3) | 0.287 | |
| M_OX_obstex_preox (%) | 0.613 | |||
| 0 | 13 ( 61.9) | 13 ( 59.1) | ||
| 1 | 8 ( 38.1) | 8 ( 36.4) | ||
| noinfo | 0 ( 0.0) | 1 ( 4.5) | ||
| M_pregNSAIDS100 = 2 (%) | 8 ( 38.1) | 5 ( 22.7) | 0.444 | |
| MG_BR_animdirtmed = 2 (%) | 7 ( 33.3) | 11 ( 50.0) | 0.425 | |
| MG_BR_artinspro_050_5099_100 (%) | 0.538 | |||
| 0 | 1 ( 4.8) | 1 ( 4.5) | ||
| 1 | 8 ( 38.1) | 5 ( 22.7) | ||
| 2 | 12 ( 57.1) | 16 ( 72.7) | ||
| MG_BR_bedmatamount_no_alot_enough_some (%) | 0.018 | |||
| ALOT | 6 ( 28.6) | 0 ( 0.0) | ||
| niu | 9 ( 42.9) | 10 ( 45.5) | ||
| no | 6 ( 28.6) | 12 ( 54.5) | ||
| MG_BR_calm = 2 (%) | 1 ( 4.8) | 2 ( 9.1) | 1.000 | |
| MG_BR_feedclean = 1 (%) | 1 ( 4.8) | 7 ( 31.8) | 0.059 | |
| MG_BR_feedtype (%) | 0.352 | |||
| crate_L | 16 ( 76.2) | 20 ( 90.9) | ||
| kiosk | 1 ( 4.8) | 0 ( 0.0) | ||
| trough | 4 ( 19.0) | 2 ( 9.1) | ||
| MG_BR_nopregus (%) | 0.548 | |||
| 1 | 8 ( 38.1) | 5 ( 22.7) | ||
| 2 | 10 ( 47.6) | 13 ( 59.1) | ||
| 3 | 3 ( 14.3) | 4 ( 18.2) | ||
| MG_BR_ster = 1 (%) | 4 ( 19.0) | 2 ( 9.1) | 0.616 | |
| R_BR_floorsolid_0981_2 = 2 (%) | 6 ( 28.6) | 1 ( 4.5) | 0.085 | |
| R_BR_kuivaliete = 12 (%) | 9 ( 42.9) | 4 ( 18.2) | 0.153 | |
| R_BR_PREGsame = 1 (%) | 8 ( 38.1) | 4 ( 18.2) | 0.265 | |
| R_BR_sowspersection (%) | 0.095 | |||
| <20 | 3 ( 14.3) | 0 ( 0.0) | ||
| 20-50 | 5 ( 23.8) | 6 ( 27.3) | ||
| 50-100 | 9 ( 42.9) | 15 ( 68.2) | ||
| all | 4 ( 19.0) | 1 ( 4.5) | ||
| MG_PR_animdirtmed = 2 (%) | 5 ( 23.8) | 10 ( 45.5) | 0.243 | |
| MG_PR_bedmatamount_no_alot_enough_some (%) | 0.045 | |||
| 0 | 4 ( 19.0) | 9 ( 40.9) | ||
| ALOT | 10 ( 47.6) | 3 ( 13.6) | ||
| NIU | 7 ( 33.3) | 10 ( 45.5) | ||
| MG_PR_feed_liq_solid (%) | 0.741 | |||
| 1 ( 4.8) | 2 ( 9.1) | |||
| liq | 12 ( 57.1) | 12 ( 54.5) | ||
| liqsol | 2 ( 9.5) | 1 ( 4.5) | ||
| sol | 5 ( 23.8) | 6 ( 27.3) | ||
| solid | 1 ( 4.8) | 0 ( 0.0) | ||
| solliq | 0 ( 0.0) | 1 ( 4.5) | ||
| MG_PR_feedtimes = 3 (%) | 3 ( 14.3) | 2 ( 9.1) | 0.956 | |
| MG_PR_kuivaliete = 12 (%) | 12 ( 57.1) | 5 ( 22.7) | 0.046 | |
| MG_PR_rootamount_no_alot_some (%) | 0.292 | |||
| 0 | 2 ( 9.5) | 5 ( 22.7) | ||
| ALOT | 10 ( 47.6) | 6 ( 27.3) | ||
| HIE | 9 ( 42.9) | 11 ( 50.0) | ||
| MG_PR_type (%) | 0.557 | |||
| loose | 2 ( 9.5) | 1 ( 4.5) | ||
| pen | 6 ( 28.6) | 10 ( 45.5) | ||
| pen_stall | 1 ( 4.8) | 2 ( 9.1) | ||
| pen_stallL | 12 ( 57.1) | 9 ( 40.9) | ||
| MG_R_PR_sowgroups = (10, Inf] (%) | 10 ( 47.6) | 10 ( 45.5) | 1.000 | |
| MG_R_PR_sowsincratespostmix = 1 (%) | 3 ( 14.3) | 7 ( 31.8) | 0.318 | |
| R_PR_areapersow (%) | 0.450 | |||
| (-Inf,3] | 8 ( 38.1) | 12 ( 54.5) | ||
| (3,3.7] | 6 ( 28.6) | 6 ( 27.3) | ||
| (3.7, Inf] | 7 ( 33.3) | 4 ( 18.2) | ||
| R_PR_dirtmed = 2 (%) | 7 ( 33.3) | 12 ( 54.5) | 0.274 | |
| R_PR_floorsolid_0791_2 = 2 (%) | 12 ( 57.1) | 5 ( 22.7) | 0.046 | |
| MG_FAR_ox (%) | 0.684 | |||
| (-Inf,3] | 8 ( 38.1) | 9 ( 40.9) | ||
| (3,7] | 10 ( 47.6) | 8 ( 36.4) | ||
| (7, Inf] | 3 ( 14.3) | 5 ( 22.7) | ||
| R_FAR_pensize = (5.25, Inf] (%) | 10 ( 47.6) | 2 ( 9.1) | 0.013 | |
| MG_FAR_bedamount (%) | 0.037 | |||
| 0 | 15 ( 71.4) | 12 ( 54.5) | ||
| 1 | 4 ( 19.0) | 1 ( 4.5) | ||
| 2 | 2 ( 9.5) | 9 ( 40.9) | ||
| MG_FAR_dirtmed = 2 (%) | 6 ( 28.6) | 13 ( 59.1) | 0.088 | |
| MG_FAR_feedtimes = 3 (%) | 16 ( 76.2) | 21 ( 95.5) | 0.167 | |
| MG_FAR_ind_0no_1rout_2sometimes (%) | 0.596 | |||
| 0 | 9 ( 42.9) | 8 ( 36.4) | ||
| 1 | 1 ( 4.8) | 3 ( 13.6) | ||
| 2 | 11 ( 52.4) | 11 ( 50.0) | ||
| MG_FAR_nestmatamount (%) | 0.546 | |||
| 0 | 7 ( 33.3) | 8 ( 36.4) | ||
| 1 | 1 ( 4.8) | 3 ( 13.6) | ||
| 2 | 13 ( 61.9) | 11 ( 50.0) | ||
| MG_FAR_rootamount (%) | 0.188 | |||
| 0 | 2 ( 9.5) | 3 ( 13.6) | ||
| 1 | 5 ( 23.8) | 1 ( 4.5) | ||
| 2 | 14 ( 66.7) | 18 ( 81.8) | ||
| MG_FAR_toy = yes (%) | 8 ( 38.1) | 15 ( 68.2) | 0.095 | |
| R_FAR_floorsolid_all0_100_100_2_muu1 (%) | 0.098 | |||
| 0 | 5 ( 23.8) | 6 ( 27.3) | ||
| 1 | 12 ( 57.1) | 16 ( 72.7) | ||
| 2 | 4 ( 19.0) | 0 ( 0.0) | ||
| R_FAR_noise = 1 (%) | 10 ( 47.6) | 9 ( 40.9) | 0.892 | |
| V_ery = 2 (%) | 0 ( 0.0) | 1 ( 4.5) | 1.000 | |
| MG_sickpen_yn = 1 (%) | 17 ( 81.0) | 16 ( 72.7) | 0.782 | |
| MG_SOWS_perworkeredit_57_113_147_ (%) | 0.071 | |||
| 1 | 8 ( 38.1) | 4 ( 18.2) | ||
| 2 | 7 ( 33.3) | 3 ( 13.6) | ||
| 3 | 4 ( 19.0) | 8 ( 36.4) | ||
| 4 | 2 ( 9.5) | 7 ( 31.8) | ||
| V_parvo = 2 (%) | 0 ( 0.0) | 1 ( 4.5) | 1.000 | |
| V_coli (%) | 0.856 | |||
| 0 | 1 ( 4.8) | 1 ( 4.5) | ||
| 1 | 19 ( 90.5) | 19 ( 86.4) | ||
| 2 | 1 ( 4.8) | 2 ( 9.1) | ||
| V_ClC = 1 (%) | 1 ( 4.8) | 2 ( 9.1) | 1.000 | |
| V_ClA = 0 (%) | 21 (100.0) | 22 (100.0) | NA | |
| V_SI = 1 (%) | 1 ( 4.8) | 3 ( 13.6) | 0.634 | |
| V_APP = 1 (%) | 2 ( 9.5) | 3 ( 13.6) | 1.000 | |
| OUT_SOW_cull_proNUM (mean (sd)) | 11.71 (6.81) | 13.95 (7.86) | 0.325 | |
| OUT_SOW_mort_proNUM (mean (sd)) | 10.05 (6.13) | 31.50 (6.49) | <0.001 | |
| OUT_SOW_cull_dic = 1 (%) | 11 ( 52.4) | 10 ( 45.5) | 0.882 | |
| OUT_SOW_mort_dic = 1 (%) | 0 ( 0.0) | 22 (100.0) | <0.001 | |
| R_PR_sowsinsection_NUM (mean (sd)) | 72.81 (55.64) | 178.82 (156.73) | 0.006 | |
| BASIC_size_pigs_NUM (mean (sd)) | 301.38 (459.94) | 458.00 (932.04) | 0.492 | |
| BASIC_size_sows_NUM (mean (sd)) | 258.19 (253.75) | 591.73 (492.07) | 0.008 | |
| BASIC_STRESSLEVEL_verymucherpal_some_NUM (%) | NaN | |||
| 0 ( 0.0) | 0 ( 0.0) | |||
| average | 6 ( 28.6) | 7 ( 31.8) | ||
| much | 4 ( 19.0) | 4 ( 18.2) | ||
| some | 8 ( 38.1) | 8 ( 36.4) | ||
| verymuch | 3 ( 14.3) | 3 ( 13.6) | ||
| M_farNSAIDS100_NUM (mean (sd)) | 24.57 (33.79) | 31.38 (37.35) | 0.544 | |
| M_farAB100_NUM (mean (sd)) | 10.18 (21.11) | 7.71 (8.64) | 0.629 | |
| M_pregAB100_NUM (mean (sd)) | 0.60 (0.72) | 1.11 (2.18) | 0.314 | |
| MG_BR_animdirt_NUM (mean (sd)) | 14.50 (23.05) | 18.95 (24.01) | 0.559 | |
| MG_BR_artinspro_NUM (mean (sd)) | 93.57 (17.88) | 94.00 (17.34) | 0.937 | |
| R_BR_floorsolid_NUM (mean (sd)) | 83.29 (13.29) | 77.14 (9.97) | 0.093 | |
| MG_PR_animalsdirty_NUM (mean (sd)) | 15.95 (12.81) | 32.05 (23.94) | 0.009 | |
| R_PR_sowgroups_NUM (mean (sd)) | 18.40 (21.37) | 13.73 (14.57) | 0.405 | |
| R_PR_areapersow_NUM (mean (sd)) | 3.37 (0.92) | 3.08 (0.88) | 0.291 | |
| R_PR_dirtypens_NUM (mean (sd)) | 15.26 (22.94) | 28.00 (31.39) | 0.158 | |
| R_PR_floorsolid_NUM (mean (sd)) | 79.95 (22.13) | 65.41 (20.47) | 0.031 | |
| MG_FAR_oxuseper10farrowings_NUM (%) | NaN | |||
| 0 ( 0.0) | 0 ( 0.0) | |||
| 0 | 1 ( 4.8) | 0 ( 0.0) | ||
| 1 | 4 ( 19.0) | 2 ( 9.1) | ||
| 10 | 3 ( 14.3) | 7 ( 31.8) | ||
| 2 | 3 ( 14.3) | 3 ( 13.6) | ||
| 3 | 3 ( 14.3) | 3 ( 13.6) | ||
| 4 | 2 ( 9.5) | 0 ( 0.0) | ||
| 5 | 2 ( 9.5) | 1 ( 4.5) | ||
| 6 | 0 ( 0.0) | 1 ( 4.5) | ||
| 7 | 0 ( 0.0) | 2 ( 9.1) | ||
| 8 | 1 ( 4.8) | 0 ( 0.0) | ||
| 9 | 2 ( 9.5) | 2 ( 9.1) | ||
| noinfo | 0 ( 0.0) | 1 ( 4.5) | ||
| R_FAR_pensize_NUM (mean (sd)) | 5.65 (1.53) | 4.88 (0.50) | 0.030 | |
| R_FAR_dirtypens_NUM (mean (sd)) | 11.43 (13.15) | 19.55 (19.88) | 0.124 | |
| R_FAR_floorsolid_NUM (mean (sd)) | 0.95 (0.67) | 0.73 (0.46) | 0.203 | |
| MG_sows_perworker_NUM (mean (sd)) | 84.76 (48.57) | 152.85 (97.60) | 0.006 |
The before assumed trend for females having a mother with low educational level is not statistically significant. However, there are significant gender-related differences between mother´s working place: females seem to have mothers staying at home more, whereas the proportion of mothers as teachers is twice that for males than females. Females indeed have more family support and they are almost unexeptionally willing to participate in higher eduction. Instead, males are more active. Females judge their health status less good (bordenline significant). And, finally, 31% of the females versus 50% of the males consume a lot of alcohol either during weekdays or weekends.
| 0 | 1 | p | test | |
|---|---|---|---|---|
| n | 22 | 21 | ||
| MG_R_PR_sowsinsection (%) | 0.102 | |||
| (-Inf,49] | 8 (36.4) | 3 ( 14.3) | ||
| (151, Inf] | 3 (13.6) | 8 ( 38.1) | ||
| (49,151] | 11 (50.0) | 10 ( 47.6) | ||
| B_Biosecused (mean (sd)) | 0.50 (0.51) | 0.48 (0.51) | 0.880 | |
| B_birds (%) | 0.577 | |||
| no | 16 (72.7) | 15 ( 71.4) | ||
| no | 0 ( 0.0) | 1 ( 4.8) | ||
| yes | 6 (27.3) | 5 ( 23.8) | ||
| B_MG_R_FR_allinallout (mean (sd)) | 0.41 (0.50) | 0.43 (0.51) | 0.900 | |
| B_MG_R_FR_desinf = yes (%) | 18 (81.8) | 14 ( 66.7) | 0.430 | |
| B_MG_R_FR_empty (mean (sd)) | 0.59 (0.50) | 0.62 (0.50) | 0.855 | |
| B_MG_R_FR_wash (mean (sd)) | 0.86 (0.35) | 0.67 (0.48) | 0.133 | |
| B_MG_R_FR_washmittel (mean (sd)) | 0.14 (0.35) | 0.33 (0.48) | 0.133 | |
| B_MG_R_PR_allinallout (mean (sd)) | 0.23 (0.43) | 0.10 (0.30) | 0.251 | |
| B_MG_R_PR_desinf = yes (%) | 5 (22.7) | 3 ( 14.3) | 0.750 | |
| B_MG_R_PR_separate (mean (sd)) | 0.73 (0.46) | 0.67 (0.48) | 0.674 | |
| B_MG_R_PR_wash (mean (sd)) | 0.14 (0.35) | 0.14 (0.36) | 0.952 | |
| B_pestcontrol (%) | 0.602 | |||
| catdogpois | 0 ( 0.0) | 1 ( 4.8) | ||
| catdogpoistrap | 0 ( 0.0) | 1 ( 4.8) | ||
| catdogpoistrapfirm | 0 ( 0.0) | 1 ( 4.8) | ||
| catpois | 6 (27.3) | 4 ( 19.0) | ||
| catpoisother | 1 ( 4.5) | 0 ( 0.0) | ||
| catpoistrap | 2 ( 9.1) | 3 ( 14.3) | ||
| catpoistrapother | 0 ( 0.0) | 1 ( 4.8) | ||
| nothing | 1 ( 4.5) | 0 ( 0.0) | ||
| pois | 8 (36.4) | 5 ( 23.8) | ||
| poistrap | 4 (18.2) | 4 ( 19.0) | ||
| trap | 0 ( 0.0) | 1 ( 4.8) | ||
| B_pestcontrolplan = yes (%) | 2 ( 9.1) | 5 ( 23.8) | 0.372 | |
| B_pestsigns = yes (%) | 16 (72.7) | 15 ( 71.4) | 1.000 | |
| B_pets_in = yes (%) | 4 (18.2) | 7 ( 33.3) | 0.430 | |
| B_V_sirco (mean (sd)) | 0.27 (0.46) | 0.33 (0.48) | 0.674 | |
| BASIC_edulevel (mean (sd)) | 3.18 (0.73) | 3.24 (0.89) | 0.822 | |
| BASIC_Interviewed (mean (sd)) | 1.82 (0.59) | 1.90 (0.62) | 0.642 | |
| BASIC_size_pigs (%) | 0.345 | |||
| (-Inf,0] | 8 (36.4) | 4 ( 19.0) | ||
| (0,390] | 10 (45.5) | 10 ( 47.6) | ||
| (390, Inf] | 4 (18.2) | 7 ( 33.3) | ||
| BASIC_size_sows (%) | 0.210 | |||
| (-Inf,102] | 8 (36.4) | 3 ( 14.3) | ||
| (102,635] | 10 (45.5) | 11 ( 52.4) | ||
| (635, Inf] | 4 (18.2) | 7 ( 33.3) | ||
| BASIC_STRESSLEVEL_verymucherpal_some = verymuch (%) | 5 (22.7) | 9 ( 42.9) | 0.279 | |
| BASIC_Type = piglet (%) | 11 (50.0) | 11 ( 52.4) | 1.000 | |
| M_farNSAIDS100 (mean (sd)) | 1.32 (0.48) | 1.57 (0.51) | 0.099 | |
| M_fever (mean (sd)) | 0.18 (0.39) | 0.10 (0.30) | 0.425 | |
| M_lame (mean (sd)) | 0.73 (0.46) | 0.71 (0.46) | 0.927 | |
| M_pregAB100 (mean (sd)) | 1.32 (0.48) | 1.38 (0.50) | 0.675 | |
| M_rAB (mean (sd)) | 0.14 (0.35) | 0.14 (0.36) | 0.952 | |
| M_rIND (mean (sd)) | 0.05 (0.21) | 0.14 (0.36) | 0.283 | |
| M_rOX (mean (sd)) | 0.32 (0.48) | 0.48 (0.51) | 0.301 | |
| M_secr (mean (sd)) | 0.09 (0.29) | 0.14 (0.36) | 0.606 | |
| M_farAB100 (mean (sd)) | 1.27 (0.46) | 1.62 (0.50) | 0.022 | |
| M_injury (mean (sd)) | 0.36 (0.49) | 0.38 (0.50) | 0.909 | |
| M_OX_obstex_preox (%) | 0.541 | |||
| 0 | 13 (59.1) | 13 ( 61.9) | ||
| 1 | 9 (40.9) | 7 ( 33.3) | ||
| noinfo | 0 ( 0.0) | 1 ( 4.8) | ||
| M_pregNSAIDS100 (mean (sd)) | 1.32 (0.48) | 1.29 (0.46) | 0.822 | |
| MG_BR_animdirtmed (mean (sd)) | 1.36 (0.49) | 1.48 (0.51) | 0.466 | |
| MG_BR_artinspro_050_5099_100 (mean (sd)) | 1.55 (0.60) | 1.67 (0.58) | 0.502 | |
| MG_BR_bedmatamount_no_alot_enough_some (%) | 0.336 | |||
| ALOT | 2 ( 9.1) | 4 ( 19.0) | ||
| niu | 12 (54.5) | 7 ( 33.3) | ||
| no | 8 (36.4) | 10 ( 47.6) | ||
| MG_BR_calm (mean (sd)) | 1.09 (0.29) | 1.05 (0.22) | 0.588 | |
| MG_BR_feedclean (mean (sd)) | 0.18 (0.39) | 0.19 (0.40) | 0.944 | |
| MG_BR_feedtype (%) | 0.129 | |||
| crate_L | 16 (72.7) | 20 ( 95.2) | ||
| kiosk | 1 ( 4.5) | 0 ( 0.0) | ||
| trough | 5 (22.7) | 1 ( 4.8) | ||
| MG_BR_nopregus (mean (sd)) | 1.73 (0.55) | 2.00 (0.77) | 0.189 | |
| MG_BR_ster (mean (sd)) | 0.09 (0.29) | 0.19 (0.40) | 0.358 | |
| R_BR_floorsolid_0981_2 (mean (sd)) | 1.14 (0.35) | 1.19 (0.40) | 0.641 | |
| R_BR_kuivaliete (mean (sd)) | 5.18 (4.77) | 4.86 (4.63) | 0.822 | |
| R_BR_PREGsame (mean (sd)) | 0.32 (0.48) | 0.24 (0.44) | 0.569 | |
| R_BR_sowspersection (%) | 0.532 | |||
| <20 | 1 ( 4.5) | 2 ( 9.5) | ||
| 20-50 | 5 (22.7) | 6 ( 28.6) | ||
| 50-100 | 12 (54.5) | 12 ( 57.1) | ||
| all | 4 (18.2) | 1 ( 4.8) | ||
| MG_PR_animdirtmed (mean (sd)) | 1.27 (0.46) | 1.43 (0.51) | 0.295 | |
| MG_PR_bedmatamount_no_alot_enough_some (%) | 0.719 | |||
| 0 | 6 (27.3) | 7 ( 33.3) | ||
| ALOT | 6 (27.3) | 7 ( 33.3) | ||
| NIU | 10 (45.5) | 7 ( 33.3) | ||
| MG_PR_feed_liq_solid (%) | 0.629 | |||
| 1 ( 4.5) | 2 ( 9.5) | |||
| liq | 12 (54.5) | 12 ( 57.1) | ||
| liqsol | 1 ( 4.5) | 2 ( 9.5) | ||
| sol | 7 (31.8) | 4 ( 19.0) | ||
| solid | 0 ( 0.0) | 1 ( 4.8) | ||
| solliq | 1 ( 4.5) | 0 ( 0.0) | ||
| MG_PR_feedtimes (mean (sd)) | 2.09 (0.29) | 2.14 (0.36) | 0.606 | |
| MG_PR_kuivaliete (mean (sd)) | 6.55 (5.10) | 5.33 (4.83) | 0.429 | |
| MG_PR_rootamount_no_alot_some (%) | 0.356 | |||
| 0 | 2 ( 9.1) | 5 ( 23.8) | ||
| ALOT | 8 (36.4) | 8 ( 38.1) | ||
| HIE | 12 (54.5) | 8 ( 38.1) | ||
| MG_PR_type (%) | 0.815 | |||
| loose | 1 ( 4.5) | 2 ( 9.5) | ||
| pen | 9 (40.9) | 7 ( 33.3) | ||
| pen_stall | 2 ( 9.1) | 1 ( 4.8) | ||
| pen_stallL | 10 (45.5) | 11 ( 52.4) | ||
| MG_R_PR_sowgroups = (10, Inf] (%) | 8 (36.4) | 12 ( 57.1) | 0.289 | |
| MG_R_PR_sowsincratespostmix (mean (sd)) | 0.27 (0.46) | 0.19 (0.40) | 0.535 | |
| R_PR_areapersow (%) | 0.136 | |||
| (-Inf,3] | 9 (40.9) | 11 ( 52.4) | ||
| (3,3.7] | 9 (40.9) | 3 ( 14.3) | ||
| (3.7, Inf] | 4 (18.2) | 7 ( 33.3) | ||
| R_PR_dirtmed (mean (sd)) | 1.41 (0.50) | 1.48 (0.51) | 0.667 | |
| R_PR_floorsolid_0791_2 (mean (sd)) | 1.45 (0.51) | 1.33 (0.48) | 0.429 | |
| MG_FAR_ox (%) | 0.765 | |||
| (-Inf,3] | 8 (36.4) | 9 ( 42.9) | ||
| (3,7] | 9 (40.9) | 9 ( 42.9) | ||
| (7, Inf] | 5 (22.7) | 3 ( 14.3) | ||
| R_FAR_pensize = (5.25, Inf] (%) | 6 (27.3) | 6 ( 28.6) | 1.000 | |
| MG_FAR_bedamount (mean (sd)) | 0.73 (0.88) | 0.52 (0.87) | 0.452 | |
| MG_FAR_dirtmed (mean (sd)) | 1.41 (0.50) | 1.48 (0.51) | 0.667 | |
| MG_FAR_feedtimes (mean (sd)) | 2.77 (0.43) | 2.95 (0.22) | 0.093 | |
| MG_FAR_ind_0no_1rout_2sometimes (mean (sd)) | 0.95 (1.00) | 1.29 (0.90) | 0.261 | |
| MG_FAR_nestmatamount (mean (sd)) | 1.45 (0.80) | 0.95 (1.02) | 0.080 | |
| MG_FAR_rootamount (mean (sd)) | 1.73 (0.55) | 1.52 (0.81) | 0.340 | |
| MG_FAR_toy = yes (%) | 10 (45.5) | 13 ( 61.9) | 0.438 | |
| R_FAR_floorsolid_all0_100_100_2_muu1 (mean (sd)) | 0.95 (0.58) | 0.71 (0.56) | 0.173 | |
| R_FAR_noise (mean (sd)) | 0.55 (0.51) | 0.33 (0.48) | 0.169 | |
| V_ery (mean (sd)) | 1.05 (0.21) | 1.00 (0.00) | 0.335 | |
| MG_sickpen_yn (mean (sd)) | 0.82 (0.39) | 0.71 (0.46) | 0.432 | |
| MG_SOWS_perworkeredit_57_113_147_ (mean (sd)) | 2.05 (1.00) | 2.81 (1.12) | 0.023 | |
| V_parvo (mean (sd)) | 1.05 (0.21) | 1.00 (0.00) | 0.335 | |
| V_coli (mean (sd)) | 1.09 (0.43) | 0.95 (0.22) | 0.190 | |
| V_ClC (mean (sd)) | 0.05 (0.21) | 0.10 (0.30) | 0.533 | |
| V_ClA (mean (sd)) | 0.00 (0.00) | 0.00 (0.00) | NaN | |
| V_SI (mean (sd)) | 0.05 (0.21) | 0.14 (0.36) | 0.283 | |
| V_APP (mean (sd)) | 0.14 (0.35) | 0.10 (0.30) | 0.683 | |
| OUT_SOW_cull_proNUM (mean (sd)) | 7.18 (3.57) | 18.81 (5.29) | <0.001 | |
| OUT_SOW_mort_proNUM (mean (sd)) | 21.05 (13.49) | 21.00 (11.74) | 0.991 | |
| OUT_SOW_cull_dic = 1 (%) | 0 ( 0.0) | 21 (100.0) | <0.001 | |
| OUT_SOW_mort_dic = 1 (%) | 12 (54.5) | 10 ( 47.6) | 0.882 | |
| R_PR_sowsinsection_NUM (mean (sd)) | 79.14 (65.74) | 177.24 (158.80) | 0.011 | |
| BASIC_size_pigs_NUM (mean (sd)) | 184.50 (403.44) | 587.90 (937.30) | 0.072 | |
| BASIC_size_sows_NUM (mean (sd)) | 322.95 (314.52) | 539.76 (499.27) | 0.094 | |
| BASIC_STRESSLEVEL_verymucherpal_some_NUM (%) | NaN | |||
| 0 ( 0.0) | 0 ( 0.0) | |||
| average | 9 (40.9) | 4 ( 19.0) | ||
| much | 1 ( 4.5) | 7 ( 33.3) | ||
| some | 8 (36.4) | 8 ( 38.1) | ||
| verymuch | 4 (18.2) | 2 ( 9.5) | ||
| M_farNSAIDS100_NUM (mean (sd)) | 24.79 (38.21) | 31.15 (32.59) | 0.570 | |
| M_farAB100_NUM (mean (sd)) | 9.27 (21.88) | 8.66 (6.55) | 0.906 | |
| M_pregAB100_NUM (mean (sd)) | 0.60 (0.68) | 1.10 (2.20) | 0.333 | |
| MG_BR_animdirt_NUM (mean (sd)) | 12.63 (11.95) | 20.50 (30.34) | 0.298 | |
| MG_BR_artinspro_NUM (mean (sd)) | 94.18 (17.28) | 93.38 (17.94) | 0.882 | |
| R_BR_floorsolid_NUM (mean (sd)) | 80.91 (11.92) | 79.33 (12.29) | 0.672 | |
| MG_PR_animalsdirty_NUM (mean (sd)) | 21.82 (17.63) | 26.67 (23.79) | 0.451 | |
| R_PR_sowgroups_NUM (mean (sd)) | 12.75 (9.36) | 19.43 (23.99) | 0.232 | |
| R_PR_areapersow_NUM (mean (sd)) | 3.25 (0.84) | 3.19 (0.98) | 0.834 | |
| R_PR_dirtypens_NUM (mean (sd)) | 19.50 (28.92) | 24.21 (27.55) | 0.606 | |
| R_PR_floorsolid_NUM (mean (sd)) | 74.09 (21.73) | 70.86 (23.28) | 0.640 | |
| MG_FAR_oxuseper10farrowings_NUM (%) | NaN | |||
| 0 ( 0.0) | 0 ( 0.0) | |||
| 0 | 1 ( 4.5) | 0 ( 0.0) | ||
| 1 | 3 (13.6) | 3 ( 14.3) | ||
| 10 | 4 (18.2) | 6 ( 28.6) | ||
| 2 | 3 (13.6) | 3 ( 14.3) | ||
| 3 | 3 (13.6) | 3 ( 14.3) | ||
| 4 | 1 ( 4.5) | 1 ( 4.8) | ||
| 5 | 2 ( 9.1) | 1 ( 4.8) | ||
| 6 | 1 ( 4.5) | 0 ( 0.0) | ||
| 7 | 1 ( 4.5) | 1 ( 4.8) | ||
| 8 | 0 ( 0.0) | 1 ( 4.8) | ||
| 9 | 3 (13.6) | 1 ( 4.8) | ||
| noinfo | 0 ( 0.0) | 1 ( 4.8) | ||
| R_FAR_pensize_NUM (mean (sd)) | 5.11 (0.85) | 5.40 (1.46) | 0.431 | |
| R_FAR_dirtypens_NUM (mean (sd)) | 12.27 (12.70) | 19.05 (20.71) | 0.201 | |
| R_FAR_floorsolid_NUM (mean (sd)) | 0.95 (0.58) | 0.71 (0.56) | 0.173 | |
| MG_sows_perworker_NUM (mean (sd)) | 87.73 (50.19) | 152.99 (99.59) | 0.009 |
Red > median mortality Green < median mortality
#lets plot
#density plots for numerical variables7
medcati<-mediso %>% select(-ends_with("NUM_NO"),-ends_with("dosage_NO"),-ends_with("NUM"))
medcati<-medcati%>%mutate_all(as.factor)
mednumi<-mediso %>% select(ends_with("NUM_NO"),(ends_with("dosage_NO")),(ends_with("NUM")))
mednumi<-mednum%>%mutate_all(as.numeric)
colNames <- names(medcati)
for(i in colNames){
plt<-ggplot(mediso, aes_string(x=i)) +
geom_bar(aes(fill = OUT_SOW_mort_dic), position = "dodge", stat="count")+
scale_fill_manual(values = c("green","red"))
plt + guides(fill=FALSE)
print(plt+guides(fill=F))
}
#### Barplots by the median culling
Orange > median culling Green < median culling
#lets plot
#density plots for numerical variables7
colNames <- names(medcati)
for(i in colNames){
plt<-ggplot(mediso, aes_string(x=i)) +
geom_bar(aes(fill = OUT_SOW_mort_dic), position = "dodge", stat="count")+
scale_fill_manual(values = c("green","orange"))
plt + guides(fill=FALSE)
print(plt+guides(fill=F))
}
Most of the mother´s working places are defined as “other” (36%) and father’s as well (36%). Altogether 14% are stay at home mother´s and 4% of the father´s are at home. There are 16% of the mothers teaching and 8% of the fathers.Especially for the females the guardian is the mother, for every fourth it is, yet, the father and for 4% another person. There is family support for 62% of the students, and it seems to be more common for females.
Almost everyone, 95% has positive attitude towards higher eduction. Again, it seems even more common for females. In romantic relationship are 32% of the respondents. Females seem to be a little less active than males: altogether 47% have no extracurricular activities. Family relationships are mainly described as good or very good (76%), which is expected these data coming from a Mediterranian country with high family values.
Altogether 35% are going out frequently, 33% not often but not rarely, and 32% quite rarely. Health status is defined as very bad or bad as often as by almost every fourth respondent. Very good or good health status is very common, though (55%). A little more than every tenth student has one or more class failures whereas 87% have none. School absences are within 6 or less hours in 77% of the cases.
Performance groups represent approximately the lowest, medium low, middle high and highest groups. Very low or low alcohol consumers both at weekdays and during weekends represent 60% of the respondents.However, there seems to be an expected trend towards males drinking more.
| 0 | 1 | p | test | |
|---|---|---|---|---|
| n | 22 | 21 | ||
| MG_SOWS_perworkeredit_57_113_147_ (%) | 0.022 | |||
| (-Inf,57] | 9 (40.9) | 3 ( 14.3) | ||
| (147, Inf] | 2 ( 9.1) | 9 ( 42.9) | ||
| (57,147] | 11 (50.0) | 9 ( 42.9) | ||
| MG_R_PR_sowsinsection (%) | 0.102 | |||
| (-Inf,49] | 8 (36.4) | 3 ( 14.3) | ||
| (151, Inf] | 3 (13.6) | 8 ( 38.1) | ||
| (49,151] | 11 (50.0) | 10 ( 47.6) | ||
| B_MG_R_FR_allinallout = 1 (%) | 9 (40.9) | 9 ( 42.9) | 1.000 | |
| B_pestcontrolplan = yes (%) | 2 ( 9.1) | 5 ( 23.8) | 0.372 | |
| BASIC_size_sows (%) | 0.210 | |||
| (-Inf,102] | 8 (36.4) | 3 ( 14.3) | ||
| (102,635] | 10 (45.5) | 11 ( 52.4) | ||
| (635, Inf] | 4 (18.2) | 7 ( 33.3) | ||
| M_farNSAIDS100 = 2 (%) | 7 (31.8) | 12 ( 57.1) | 0.172 | |
| M_pregAB100 = 2 (%) | 7 (31.8) | 8 ( 38.1) | 0.911 | |
| M_rOX = 1 (%) | 7 (31.8) | 10 ( 47.6) | 0.455 | |
| M_farAB100 = 2 (%) | 6 (27.3) | 13 ( 61.9) | 0.048 | |
| M_pregNSAIDS100 = 2 (%) | 7 (31.8) | 6 ( 28.6) | 1.000 | |
| MG_BR_animdirtmed = 2 (%) | 8 (36.4) | 10 ( 47.6) | 0.661 | |
| MG_BR_bedmatamount_no_alot_enough_some (%) | 0.336 | |||
| ALOT | 2 ( 9.1) | 4 ( 19.0) | ||
| niu | 12 (54.5) | 7 ( 33.3) | ||
| no | 8 (36.4) | 10 ( 47.6) | ||
| MG_BR_feedtype (%) | 0.129 | |||
| crate_L | 16 (72.7) | 20 ( 95.2) | ||
| kiosk | 1 ( 4.5) | 0 ( 0.0) | ||
| trough | 5 (22.7) | 1 ( 4.8) | ||
| R_BR_floorsolid_0981_2 = 2 (%) | 3 (13.6) | 4 ( 19.0) | 0.946 | |
| R_BR_kuivaliete = 12 (%) | 7 (31.8) | 6 ( 28.6) | 1.000 | |
| R_BR_PREGsame = 1 (%) | 7 (31.8) | 5 ( 23.8) | 0.806 | |
| R_BR_sowspersection (%) | 0.532 | |||
| <20 | 1 ( 4.5) | 2 ( 9.5) | ||
| 20-50 | 5 (22.7) | 6 ( 28.6) | ||
| 50-100 | 12 (54.5) | 12 ( 57.1) | ||
| all | 4 (18.2) | 1 ( 4.8) | ||
| MG_PR_animdirtmed = 2 (%) | 6 (27.3) | 9 ( 42.9) | 0.452 | |
| MG_PR_bedmatamount_no_alot_enough_some (%) | 0.719 | |||
| 0 | 6 (27.3) | 7 ( 33.3) | ||
| ALOT | 6 (27.3) | 7 ( 33.3) | ||
| NIU | 10 (45.5) | 7 ( 33.3) | ||
| MG_PR_kuivaliete = 12 (%) | 10 (45.5) | 7 ( 33.3) | 0.617 | |
| MG_PR_rootamount_no_alot_some (%) | 0.356 | |||
| 0 | 2 ( 9.1) | 5 ( 23.8) | ||
| ALOT | 8 (36.4) | 8 ( 38.1) | ||
| HIE | 12 (54.5) | 8 ( 38.1) | ||
| MG_PR_type (%) | 0.815 | |||
| loose | 1 ( 4.5) | 2 ( 9.5) | ||
| pen | 9 (40.9) | 7 ( 33.3) | ||
| pen_stall | 2 ( 9.1) | 1 ( 4.8) | ||
| pen_stallL | 10 (45.5) | 11 ( 52.4) | ||
| R_PR_dirtmed = 2 (%) | 9 (40.9) | 10 ( 47.6) | 0.892 | |
| R_PR_floorsolid_0791_2 = 2 (%) | 10 (45.5) | 7 ( 33.3) | 0.617 | |
| MG_FAR_ox (%) | 0.765 | |||
| (-Inf,3] | 8 (36.4) | 9 ( 42.9) | ||
| (3,7] | 9 (40.9) | 9 ( 42.9) | ||
| (7, Inf] | 5 (22.7) | 3 ( 14.3) | ||
| MG_FAR_bedamount (%) | 0.333 | |||
| 0 | 12 (54.5) | 15 ( 71.4) | ||
| 1 | 4 (18.2) | 1 ( 4.8) | ||
| 2 | 6 (27.3) | 5 ( 23.8) | ||
| MG_FAR_dirtmed = 2 (%) | 9 (40.9) | 10 ( 47.6) | 0.892 | |
| MG_FAR_nestmatamount (%) | 0.019 | |||
| 0 | 4 (18.2) | 11 ( 52.4) | ||
| 1 | 4 (18.2) | 0 ( 0.0) | ||
| 2 | 14 (63.6) | 10 ( 47.6) | ||
| MG_FAR_rootamount (%) | 0.277 | |||
| 0 | 1 ( 4.5) | 4 ( 19.0) | ||
| 1 | 4 (18.2) | 2 ( 9.5) | ||
| 2 | 17 (77.3) | 15 ( 71.4) | ||
| R_FAR_floorsolid_all0_100_100_2_muu1 (%) | 0.379 | |||
| 0 | 4 (18.2) | 7 ( 33.3) | ||
| 1 | 15 (68.2) | 13 ( 61.9) | ||
| 2 | 3 (13.6) | 1 ( 4.8) | ||
| MG_FAR_ind_0no_1rout_2sometimes (%) | 0.268 | |||
| 0 | 11 (50.0) | 6 ( 28.6) | ||
| 1 | 1 ( 4.5) | 3 ( 14.3) | ||
| 2 | 10 (45.5) | 12 ( 57.1) | ||
| OUT_SOW_mort_dic = 1 (%) | 12 (54.5) | 10 ( 47.6) | 0.882 | |
| OUT_SOW_cull_dic = 1 (%) | 0 ( 0.0) | 21 (100.0) | <0.001 | |
| OUT_mort15 = 1 (%) | 5 (22.7) | 3 ( 14.3) | 0.750 | |
| OUT_mort5 = 1 (%) | 14 (63.6) | 16 ( 76.2) | 0.573 | |
| OUT_cull50 = 1 (%) | 0 ( 0.0) | 5 ( 23.8) | 0.050 | |
| OUT_cull30 = 1 (%) | 9 (40.9) | 20 ( 95.2) | 0.001 | |
| OUT_SOW_mort_proNUM (mean (sd)) | 21.05 (13.49) | 21.00 (11.74) | 0.991 | |
| OUT_SOW_cull_proNUM (mean (sd)) | 7.18 (3.57) | 18.81 (5.29) | <0.001 |
| 0 | 1 | p | test | |
|---|---|---|---|---|
| n | 22 | 21 | ||
| MG_SOWS_perworkeredit_57_113_147_ (%) | 0.022 | |||
| (-Inf,57] | 9 (40.9) | 3 ( 14.3) | ||
| (147, Inf] | 2 ( 9.1) | 9 ( 42.9) | ||
| (57,147] | 11 (50.0) | 9 ( 42.9) | ||
| MG_R_PR_sowsinsection (%) | 0.102 | |||
| (-Inf,49] | 8 (36.4) | 3 ( 14.3) | ||
| (151, Inf] | 3 (13.6) | 8 ( 38.1) | ||
| (49,151] | 11 (50.0) | 10 ( 47.6) | ||
| B_MG_R_FR_allinallout = 1 (%) | 9 (40.9) | 9 ( 42.9) | 1.000 | |
| B_pestcontrolplan = yes (%) | 2 ( 9.1) | 5 ( 23.8) | 0.372 | |
| BASIC_size_sows (%) | 0.210 | |||
| (-Inf,102] | 8 (36.4) | 3 ( 14.3) | ||
| (102,635] | 10 (45.5) | 11 ( 52.4) | ||
| (635, Inf] | 4 (18.2) | 7 ( 33.3) | ||
| M_farNSAIDS100 = 2 (%) | 7 (31.8) | 12 ( 57.1) | 0.172 | |
| M_pregAB100 = 2 (%) | 7 (31.8) | 8 ( 38.1) | 0.911 | |
| M_rOX = 1 (%) | 7 (31.8) | 10 ( 47.6) | 0.455 | |
| M_farAB100 = 2 (%) | 6 (27.3) | 13 ( 61.9) | 0.048 | |
| M_pregNSAIDS100 = 2 (%) | 7 (31.8) | 6 ( 28.6) | 1.000 | |
| MG_BR_animdirtmed = 2 (%) | 8 (36.4) | 10 ( 47.6) | 0.661 | |
| MG_BR_bedmatamount_no_alot_enough_some (%) | 0.336 | |||
| ALOT | 2 ( 9.1) | 4 ( 19.0) | ||
| niu | 12 (54.5) | 7 ( 33.3) | ||
| no | 8 (36.4) | 10 ( 47.6) | ||
| MG_BR_feedtype (%) | 0.129 | |||
| crate_L | 16 (72.7) | 20 ( 95.2) | ||
| kiosk | 1 ( 4.5) | 0 ( 0.0) | ||
| trough | 5 (22.7) | 1 ( 4.8) | ||
| R_BR_floorsolid_0981_2 = 2 (%) | 3 (13.6) | 4 ( 19.0) | 0.946 | |
| R_BR_kuivaliete = 12 (%) | 7 (31.8) | 6 ( 28.6) | 1.000 | |
| R_BR_PREGsame = 1 (%) | 7 (31.8) | 5 ( 23.8) | 0.806 | |
| R_BR_sowspersection (%) | 0.532 | |||
| <20 | 1 ( 4.5) | 2 ( 9.5) | ||
| 20-50 | 5 (22.7) | 6 ( 28.6) | ||
| 50-100 | 12 (54.5) | 12 ( 57.1) | ||
| all | 4 (18.2) | 1 ( 4.8) | ||
| MG_PR_animdirtmed = 2 (%) | 6 (27.3) | 9 ( 42.9) | 0.452 | |
| MG_PR_bedmatamount_no_alot_enough_some (%) | 0.719 | |||
| 0 | 6 (27.3) | 7 ( 33.3) | ||
| ALOT | 6 (27.3) | 7 ( 33.3) | ||
| NIU | 10 (45.5) | 7 ( 33.3) | ||
| MG_PR_kuivaliete = 12 (%) | 10 (45.5) | 7 ( 33.3) | 0.617 | |
| MG_PR_rootamount_no_alot_some (%) | 0.356 | |||
| 0 | 2 ( 9.1) | 5 ( 23.8) | ||
| ALOT | 8 (36.4) | 8 ( 38.1) | ||
| HIE | 12 (54.5) | 8 ( 38.1) | ||
| MG_PR_type (%) | 0.815 | |||
| loose | 1 ( 4.5) | 2 ( 9.5) | ||
| pen | 9 (40.9) | 7 ( 33.3) | ||
| pen_stall | 2 ( 9.1) | 1 ( 4.8) | ||
| pen_stallL | 10 (45.5) | 11 ( 52.4) | ||
| R_PR_dirtmed = 2 (%) | 9 (40.9) | 10 ( 47.6) | 0.892 | |
| R_PR_floorsolid_0791_2 = 2 (%) | 10 (45.5) | 7 ( 33.3) | 0.617 | |
| MG_FAR_ox (%) | 0.765 | |||
| (-Inf,3] | 8 (36.4) | 9 ( 42.9) | ||
| (3,7] | 9 (40.9) | 9 ( 42.9) | ||
| (7, Inf] | 5 (22.7) | 3 ( 14.3) | ||
| MG_FAR_bedamount (%) | 0.333 | |||
| 0 | 12 (54.5) | 15 ( 71.4) | ||
| 1 | 4 (18.2) | 1 ( 4.8) | ||
| 2 | 6 (27.3) | 5 ( 23.8) | ||
| MG_FAR_dirtmed = 2 (%) | 9 (40.9) | 10 ( 47.6) | 0.892 | |
| MG_FAR_nestmatamount (%) | 0.019 | |||
| 0 | 4 (18.2) | 11 ( 52.4) | ||
| 1 | 4 (18.2) | 0 ( 0.0) | ||
| 2 | 14 (63.6) | 10 ( 47.6) | ||
| MG_FAR_rootamount (%) | 0.277 | |||
| 0 | 1 ( 4.5) | 4 ( 19.0) | ||
| 1 | 4 (18.2) | 2 ( 9.5) | ||
| 2 | 17 (77.3) | 15 ( 71.4) | ||
| R_FAR_floorsolid_all0_100_100_2_muu1 (%) | 0.379 | |||
| 0 | 4 (18.2) | 7 ( 33.3) | ||
| 1 | 15 (68.2) | 13 ( 61.9) | ||
| 2 | 3 (13.6) | 1 ( 4.8) | ||
| MG_FAR_ind_0no_1rout_2sometimes (%) | 0.268 | |||
| 0 | 11 (50.0) | 6 ( 28.6) | ||
| 1 | 1 ( 4.5) | 3 ( 14.3) | ||
| 2 | 10 (45.5) | 12 ( 57.1) | ||
| OUT_SOW_mort_dic = 1 (%) | 12 (54.5) | 10 ( 47.6) | 0.882 | |
| OUT_SOW_cull_dic = 1 (%) | 0 ( 0.0) | 21 (100.0) | <0.001 | |
| OUT_mort15 = 1 (%) | 5 (22.7) | 3 ( 14.3) | 0.750 | |
| OUT_mort5 = 1 (%) | 14 (63.6) | 16 ( 76.2) | 0.573 | |
| OUT_cull50 = 1 (%) | 0 ( 0.0) | 5 ( 23.8) | 0.050 | |
| OUT_cull30 = 1 (%) | 9 (40.9) | 20 ( 95.2) | 0.001 | |
| OUT_SOW_mort_proNUM (mean (sd)) | 21.05 (13.49) | 21.00 (11.74) | 0.991 | |
| OUT_SOW_cull_proNUM (mean (sd)) | 7.18 (3.57) | 18.81 (5.29) | <0.001 |
#density plots for numerical variables7
colNames <- names(dfalc[,1:37])
for(i in colNames){
plt<-ggplot(dfalc, aes_string(x=i)) +
geom_bar(aes(fill = OUT_SOW_cull_dic), position = "dodge", stat="count")+
scale_fill_manual(values = c("green","red"))
plt + guides(fill=FALSE)
print(plt+guides(fill=F))
}
#lets plot
#density plots for numerical variables7
colNames <- names(dfalc[,1:37])
for(i in colNames){
plt<-ggplot(dfalc, aes_string(x=i)) +
geom_bar(aes(fill = OUT_SOW_mort_dic), position = "dodge", stat="count")+
scale_fill_manual(values = c("green","orange"))
print(plt)
}
There are differences among the age groups in final grades. Younger student get better scores. Mother´s educational background seem to affect the grades, whereas father´s education is not that influental. The same is seen with mother´s and father´s working place. Guardian does not affect school performance, but willingness to take higher education definitely does. Surprisingly, going out with friends does not affect final grades, but health status does. There are a lot of students in a very good or good condition performing below the average. Class failures understandably worsen the grades. Low alcohol usage is less common in the best performance group.
Males drink more than females, as do the younger ones as well.Father´s job affects alcohol consumption, but mother´s job, student´s guardian or family relationships seem not to. Going out is associated with alcohol usage, but health group seems not to. Class failures are more common among the heavy alcohol users, as well as the highest numbers of school absences. Mean final grade differs significantly between the groups (mean(sd)): 11.74(3.43) versus 11.06(3.04).
Simple form of analysing categorical data is cross-tabulation. Correspondence analysis is an extention of contingency table data and a generalization of principal component approach. Multiple correspondence analysis (MCA) is an extension of correspondence analysis and allows to investigate the pattern of relationships of several categorical dependent variables simultaneously. Applying multiple correspondence analysis helps to reduce the interaction parameters. Using the results of a MCA, it is possible to describe the structure of all the categorical variables included. The computational graphical representations covers basically every bit of information in the data by mapping each variable/individual of analysis as a point in a low-dimensional space.
To encompass, MCA has several features that distinguish it from other techniques of data analysis. It simplifies large and complex data and provides a detailed description of practically every bit of information in the data, yielding a simple, yet exhaustive scrutiny of relationships occuring by multiple pair wise comparisons. Graphically, dual displays are produced to facilitate interpretation.
Basically, the first step is that a crosstabulated frequency table is standardized to yield relative frequencies across the cells to sum up to 1.0. The aim of a MCA analysis is to represent the entries in the table of relative frequencies in terms of the distances between individual rows and/or columns in a low-dimensional space.
MCA() function that come in the package “FactoMineR” by Francois Husson, Julie Josse, Sebastien Le, and Jeremy Mazet. Additionally, package “factoextra” is used to beautifully visualize multiple correspondence analysis.
dfalc<-med
res.mca = MCA(dfalc,quanti.sup=(38:39),quali.sup=(32:37), graph = FALSE)
There are 434 individuals and 55 variable categories. Additionally, there is one quantitative variable, which is considered illustrative.
The output of the MCA() function is a list including :
res_mca <- MCA(dfalc,quanti.sup=(38:39),quali.sup=(32:37), graph = FALSE)
print(res_mca)
## **Results of the Multiple Correspondence Analysis (MCA)**
## The analysis was performed on 43 individuals, described by 39 variables
## *The results are available in the following objects:
##
## name
## 1 "$eig"
## 2 "$var"
## 3 "$var$coord"
## 4 "$var$cos2"
## 5 "$var$contrib"
## 6 "$var$v.test"
## 7 "$ind"
## 8 "$ind$coord"
## 9 "$ind$cos2"
## 10 "$ind$contrib"
## 11 "$quanti.sup"
## 12 "$quanti.sup$coord"
## 13 "$quali.sup"
## 14 "$quali.sup$coord"
## 15 "$quali.sup$cos2"
## 16 "$quali.sup$v.test"
## 17 "$call"
## 18 "$call$marge.col"
## 19 "$call$marge.li"
## description
## 1 "eigenvalues"
## 2 "results for the variables"
## 3 "coord. of the categories"
## 4 "cos2 for the categories"
## 5 "contributions of the categories"
## 6 "v-test for the categories"
## 7 "results for the individuals"
## 8 "coord. for the individuals"
## 9 "cos2 for the individuals"
## 10 "contributions of the individuals"
## 11 "results for the supplementary quantitative variables"
## 12 "coord. of the supplementary quantitative variables"
## 13 "results for the supplementary categorical variables"
## 14 "coord. for the supplementary categories"
## 15 "cos2 for the supplementary categories"
## 16 "v-test for the supplementary categories"
## 17 "intermediate results"
## 18 "weights of columns"
## 19 "weights of rows"
For the variables a correlation ratio (squared) between it and each dimension is given (eta^2) enabling the plotting of the variables. The v-test in the summary follows a gaussian distribution referring to the category having a coordinate significantly different from zero.
summary(res_mca,abbrev=TRUE)
##
## Call:
## MCA(X = dfalc, quanti.sup = (38:39), quali.sup = (32:37), graph = FALSE)
##
##
## Eigenvalues
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5 Dim.6
## Variance 0.291 0.183 0.124 0.098 0.087 0.075
## % of var. 18.780 11.818 8.027 6.300 5.630 4.862
## Cumulative % of var. 18.780 30.597 38.625 44.925 50.555 55.417
## Dim.7 Dim.8 Dim.9 Dim.10 Dim.11 Dim.12
## Variance 0.068 0.058 0.051 0.047 0.043 0.040
## % of var. 4.368 3.777 3.269 3.023 2.765 2.603
## Cumulative % of var. 59.786 63.563 66.832 69.855 72.620 75.224
## Dim.13 Dim.14 Dim.15 Dim.16 Dim.17 Dim.18
## Variance 0.039 0.036 0.033 0.032 0.027 0.025
## % of var. 2.495 2.295 2.155 2.044 1.745 1.615
## Cumulative % of var. 77.719 80.014 82.168 84.212 85.957 87.572
## Dim.19 Dim.20 Dim.21 Dim.22 Dim.23 Dim.24
## Variance 0.025 0.023 0.020 0.018 0.015 0.012
## % of var. 1.606 1.507 1.289 1.145 0.982 0.778
## Cumulative % of var. 89.178 90.685 91.974 93.118 94.100 94.878
## Dim.25 Dim.26 Dim.27 Dim.28 Dim.29 Dim.30
## Variance 0.011 0.010 0.009 0.008 0.007 0.006
## % of var. 0.739 0.636 0.575 0.523 0.467 0.370
## Cumulative % of var. 95.617 96.253 96.829 97.351 97.818 98.188
## Dim.31 Dim.32 Dim.33 Dim.34 Dim.35 Dim.36
## Variance 0.005 0.005 0.004 0.003 0.003 0.002
## % of var. 0.346 0.319 0.251 0.221 0.200 0.142
## Cumulative % of var. 98.534 98.853 99.104 99.325 99.524 99.666
## Dim.37 Dim.38 Dim.39 Dim.40 Dim.41 Dim.42
## Variance 0.002 0.001 0.001 0.001 0.000 0.000
## % of var. 0.121 0.084 0.053 0.046 0.017 0.012
## Cumulative % of var. 99.787 99.872 99.925 99.971 99.988 100.000
##
## Individuals (the 10 first)
## Dim.1 ctr cos2 Dim.2 ctr cos2
## 1 | -0.613 3.006 0.233 | 0.383 1.863 0.091 |
## 2 | 0.638 3.253 0.121 | -0.088 0.098 0.002 |
## 3 | 0.718 4.121 0.288 | 0.203 0.524 0.023 |
## 4 | -0.399 1.274 0.162 | -0.321 1.307 0.105 |
## 5 | -0.703 3.957 0.363 | 0.304 1.171 0.068 |
## 6 | 0.837 5.599 0.303 | 0.399 2.027 0.069 |
## 7 | -0.366 1.069 0.112 | 0.246 0.771 0.051 |
## 8 | 0.156 0.196 0.014 | -0.169 0.364 0.016 |
## 9 | 0.135 0.146 0.017 | -0.610 4.724 0.349 |
## 10 | -0.257 0.529 0.067 | 0.186 0.439 0.035 |
## Dim.3 ctr cos2
## 1 0.484 4.392 0.146 |
## 2 0.205 0.783 0.012 |
## 3 -0.130 0.317 0.009 |
## 4 -0.318 1.890 0.103 |
## 5 0.278 1.451 0.057 |
## 6 -0.220 0.909 0.021 |
## 7 -0.346 2.239 0.100 |
## 8 -0.717 9.624 0.293 |
## 9 -0.103 0.197 0.010 |
## 10 -0.473 4.191 0.228 |
##
## Categories (the 10 first)
## Dim.1 ctr cos2 v.test Dim.2 ctr
## (-Inf,57] | 1.309 5.309 0.664 5.280 | -0.223 0.244
## (147, Inf] | -0.923 2.416 0.293 -3.506 | -0.123 0.068
## (57,147] | -0.278 0.399 0.067 -1.681 | 0.201 0.332
## (-Inf,49] | 0.951 2.564 0.311 3.612 | 0.416 0.779
## (151, Inf] | -0.425 0.513 0.062 -1.615 | 0.160 0.116
## (49,151] | -0.275 0.411 0.072 -1.743 | -0.302 0.784
## B_MG_R_FR_allinallout_0 | 0.444 1.274 0.274 3.394 | -0.166 0.283
## B_MG_R_FR_allinallout_1 | -0.617 1.769 0.274 -3.394 | 0.231 0.393
## B_pestcontrolplan_no | 0.195 0.354 0.196 2.869 | -0.085 0.108
## B_pestcontrolplan_yes | -1.004 1.821 0.196 -2.869 | 0.439 0.554
## cos2 v.test Dim.3 ctr cos2 v.test
## (-Inf,57] 0.019 -0.899 | 0.459 1.525 0.081 1.850 |
## (147, Inf] 0.005 -0.467 | 0.695 3.207 0.166 2.641 |
## (57,147] 0.035 1.217 | -0.658 5.219 0.376 -3.974 |
## (-Inf,49] 0.059 1.579 | 0.410 1.114 0.058 1.557 |
## (151, Inf] 0.009 0.609 | 0.712 3.369 0.174 2.707 |
## (49,151] 0.087 -1.910 | -0.588 4.378 0.330 -3.721 |
## B_MG_R_FR_allinallout_0 0.038 -1.269 | -0.195 0.571 0.053 -1.486 |
## B_MG_R_FR_allinallout_1 0.038 1.269 | 0.270 0.794 0.053 1.486 |
## B_pestcontrolplan_no 0.038 -1.256 | -0.148 0.476 0.113 -2.175 |
## B_pestcontrolplan_yes 0.038 1.256 | 0.761 2.448 0.113 2.175 |
##
## Categorical variables (eta2)
## Dim.1 Dim.2 Dim.3
## MG_SOWS_perworkeredit_57_113_147_ | 0.732 0.037 0.383 |
## MG_R_PR_sowsinsection | 0.314 0.095 0.341 |
## B_MG_R_FR_allinallout | 0.274 0.038 0.053 |
## B_pestcontrolplan | 0.196 0.038 0.113 |
## BASIC_size_sows | 0.646 0.053 0.334 |
## M_farNSAIDS100 | 0.096 0.405 0.028 |
## M_pregAB100 | 0.037 0.243 0.022 |
## M_rOX | 0.212 0.206 0.007 |
## M_farAB100 | 0.078 0.307 0.002 |
## M_pregNSAIDS100 | 0.009 0.375 0.007 |
##
## Supplementary categories (the 10 first)
## Dim.1 cos2 v.test Dim.2 cos2 v.test
## OUT_SOW_mort_dic_0 | 0.380 0.138 2.409 | 0.300 0.086 1.900 |
## OUT_SOW_mort_dic_1 | -0.363 0.138 -2.409 | -0.286 0.086 -1.900 |
## OUT_SOW_cull_dic_0 | 0.273 0.078 1.808 | -0.155 0.025 -1.029 |
## OUT_SOW_cull_dic_1 | -0.286 0.078 -1.808 | 0.163 0.025 1.029 |
## OUT_mort15_0 | 0.153 0.103 2.076 | -0.041 0.007 -0.552 |
## OUT_mort15_1 | -0.670 0.103 -2.076 | 0.178 0.007 0.552 |
## OUT_mort5_0 | 0.326 0.046 1.389 | 0.244 0.026 1.043 |
## OUT_mort5_1 | -0.141 0.046 -1.389 | -0.106 0.026 -1.043 |
## OUT_cull50_0 | 0.058 0.025 1.031 | 0.020 0.003 0.363 |
## OUT_cull50_1 | -0.438 0.025 -1.031 | -0.154 0.003 -0.363 |
## Dim.3 cos2 v.test
## OUT_SOW_mort_dic_0 -0.113 0.012 -0.714 |
## OUT_SOW_mort_dic_1 0.108 0.012 0.714 |
## OUT_SOW_cull_dic_0 -0.077 0.006 -0.513 |
## OUT_SOW_cull_dic_1 0.081 0.006 0.513 |
## OUT_mort15_0 -0.101 0.044 -1.367 |
## OUT_mort15_1 0.441 0.044 1.367 |
## OUT_mort5_0 0.001 0.000 0.005 |
## OUT_mort5_1 -0.001 0.000 -0.005 |
## OUT_cull50_0 -0.032 0.008 -0.578 |
## OUT_cull50_1 0.246 0.008 0.578 |
##
## Supplementary categorical variables (eta2)
## Dim.1 Dim.2 Dim.3
## OUT_SOW_mort_dic | 0.138 0.086 0.012 |
## OUT_SOW_cull_dic | 0.078 0.025 0.006 |
## OUT_mort15 | 0.103 0.007 0.044 |
## OUT_mort5 | 0.046 0.026 0.000 |
## OUT_cull50 | 0.025 0.003 0.008 |
## OUT_cull30 | 0.122 0.008 0.023 |
##
## Supplementary continuous variables
## Dim.1 Dim.2 Dim.3
## OUT_SOW_mort_proNUM | -0.371 | -0.148 | 0.143 |
## OUT_SOW_cull_proNUM | -0.413 | 0.040 | -0.017 |
Dimdesc function points out the variables and the categories that are the most characteristic according to each dimension obtained by a MCA, i.e. it aims to facilitate interpretations of the dimensions in allowing to see which variables the axes are the most linked to/ which categories describe the best each axis.
dimdesc(res_mca,axes=1:2,proba=0.05)
## $`Dim 1`
## $`Dim 1`$quanti
## correlation p.value
## OUT_SOW_mort_proNUM -0.37 0.014
## OUT_SOW_cull_proNUM -0.41 0.006
##
## $`Dim 1`$quali
## R2 p.value
## MG_SOWS_perworkeredit_57_113_147_ 0.732 0.0000000000036
## BASIC_size_sows 0.646 0.0000000009650
## R_BR_floorsolid_0981_2 0.560 0.0000000078485
## MG_BR_bedmatamount_no_alot_enough_some 0.551 0.0000001089746
## R_BR_sowspersection 0.573 0.0000002462720
## R_BR_PREGsame 0.473 0.0000003528065
## R_FAR_floorsolid_all0_100_100_2_muu1 0.508 0.0000007019593
## MG_FAR_bedamount 0.471 0.0000029377317
## MG_FAR_nestmatamount 0.436 0.0000104497923
## R_BR_kuivaliete 0.379 0.0000110470059
## MG_BR_feedtype 0.434 0.0000114838205
## MG_FAR_rootamount 0.386 0.0000588893753
## MG_PR_bedmatamount_no_alot_enough_some 0.378 0.0000749701985
## B_MG_R_FR_allinallout 0.274 0.0003136829729
## MG_R_PR_sowsinsection 0.314 0.0005270298196
## MG_BR_animdirtmed 0.242 0.0008170902172
## M_rOX 0.212 0.0018921444548
## MG_PR_kuivaliete 0.212 0.0019003136639
## B_pestcontrolplan 0.196 0.0029463577251
## R_PR_floorsolid_0791_2 0.181 0.0044762285808
## MG_PR_rootamount_no_alot_some 0.207 0.0096180877367
## R_PR_dirtmed 0.142 0.0128782579418
## OUT_SOW_mort_dic 0.138 0.0141077568673
## OUT_cull30 0.122 0.0215292476732
## OUT_mort15 0.103 0.0362672362173
## MG_PR_animdirtmed 0.102 0.0370065871473
## M_farNSAIDS100 0.096 0.0434002412391
##
## $`Dim 1`$category
## Estimate p.value
## (-Inf,57] 0.687 0.00000000003
## (-Inf,102] 0.664 0.00000000222
## R_BR_floorsolid_0981_2_2 0.547 0.00000000785
## R_BR_PREGsame_1 0.413 0.00000035281
## trough 0.393 0.00000915457
## MG_FAR_bedamount_1 0.641 0.00000981448
## R_BR_kuivaliete_12 0.362 0.00001104701
## R_FAR_floorsolid_all0_100_100_2_muu1_2 0.794 0.00004441590
## (-Inf,49] 0.468 0.00010357028
## MG_BR_bedmatamount_no_alot_enough_some_ALOT 0.583 0.00010450475
## all 0.441 0.00027637128
## MG_FAR_rootamount_1 0.682 0.00028443403
## B_MG_R_FR_allinallout_0 0.286 0.00031368297
## MG_BR_animdirtmed_1 0.269 0.00081709022
## M_rOX_0 0.254 0.00189214445
## MG_PR_kuivaliete_12 0.254 0.00190031366
## B_pestcontrolplan_no 0.323 0.00294635773
## R_PR_floorsolid_0791_2_2 0.234 0.00447622858
## <20 0.489 0.00473926869
## MG_FAR_nestmatamount_1 0.522 0.01133726527
## R_PR_dirtmed_1 0.204 0.01287825794
## OUT_SOW_mort_dic_0 0.201 0.01410775687
## MG_FAR_nestmatamount_2 0.053 0.01618214072
## OUT_cull30_0 0.201 0.02152924767
## MG_PR_bedmatamount_no_alot_enough_some_ALOT 0.303 0.02153413745
## MG_FAR_ind_0no_1rout_2sometimes_0 0.281 0.03257320959
## MG_PR_rootamount_no_alot_some_ALOT 0.319 0.03593801699
## OUT_mort15_0 0.222 0.03626723622
## MG_PR_animdirtmed_1 0.181 0.03700658715
## M_farNSAIDS100_1 0.168 0.04340024124
## M_farNSAIDS100_2 -0.168 0.04340024124
## MG_PR_animdirtmed_2 -0.181 0.03700658715
## OUT_mort15_1 -0.222 0.03626723622
## OUT_cull30_1 -0.201 0.02152924767
## OUT_SOW_mort_dic_1 -0.201 0.01410775687
## R_PR_dirtmed_2 -0.204 0.01287825794
## MG_FAR_rootamount_0 -0.621 0.00752282620
## MG_PR_rootamount_no_alot_some_0 -0.410 0.00595920041
## R_PR_floorsolid_0791_2_1 -0.234 0.00447622858
## B_pestcontrolplan_yes -0.323 0.00294635773
## MG_PR_kuivaliete_2 -0.254 0.00190031366
## M_rOX_1 -0.254 0.00189214445
## MG_BR_animdirtmed_2 -0.269 0.00081709022
## (635, Inf] -0.493 0.00079474026
## R_FAR_floorsolid_all0_100_100_2_muu1_0 -0.657 0.00041785500
## B_MG_R_FR_allinallout_1 -0.286 0.00031368297
## (147, Inf] -0.517 0.00018011497
## MG_FAR_bedamount_0 -0.508 0.00011727921
## 50-100 -0.631 0.00002175542
## MG_PR_bedmatamount_no_alot_enough_some_0 -0.481 0.00001571214
## MG_FAR_nestmatamount_0 -0.574 0.00001231460
## R_BR_kuivaliete_2 -0.362 0.00001104701
## MG_BR_bedmatamount_no_alot_enough_some_no -0.577 0.00000219720
## crate_L -0.594 0.00000173634
## R_BR_PREGsame_0 -0.413 0.00000035281
## R_BR_floorsolid_0981_2_1 -0.547 0.00000000785
##
##
## $`Dim 2`
## $`Dim 2`$quali
## R2 p.value
## MG_PR_bedmatamount_no_alot_enough_some 0.58 0.000000037
## M_farNSAIDS100 0.41 0.000004478
## M_pregNSAIDS100 0.37 0.000012953
## MG_PR_rootamount_no_alot_some 0.40 0.000034516
## M_farAB100 0.31 0.000114170
## MG_PR_kuivaliete 0.29 0.000210855
## MG_FAR_dirtmed 0.27 0.000348390
## R_PR_dirtmed 0.25 0.000736204
## M_pregAB100 0.24 0.000786324
## R_PR_floorsolid_0791_2 0.22 0.001674460
## M_rOX 0.21 0.002219612
## MG_FAR_bedamount 0.25 0.002884813
## MG_BR_bedmatamount_no_alot_enough_some 0.24 0.003697582
## MG_FAR_ind_0no_1rout_2sometimes 0.24 0.003741257
## MG_FAR_ox 0.23 0.004800378
## R_FAR_floorsolid_all0_100_100_2_muu1 0.23 0.005722594
## R_BR_kuivaliete 0.13 0.016883835
##
## $`Dim 2`$category
## Estimate p.value
## MG_PR_bedmatamount_no_alot_enough_some_ALOT 0.402 0.00000075
## M_farNSAIDS100_2 0.274 0.00000448
## M_pregNSAIDS100_2 0.285 0.00001295
## MG_PR_rootamount_no_alot_some_ALOT 0.325 0.00001465
## M_farAB100_2 0.239 0.00011417
## MG_PR_kuivaliete_12 0.235 0.00021086
## MG_FAR_dirtmed_1 0.224 0.00034839
## R_PR_dirtmed_1 0.213 0.00073620
## M_pregAB100_2 0.221 0.00078632
## MG_BR_bedmatamount_no_alot_enough_some_ALOT 0.401 0.00090371
## R_PR_floorsolid_0791_2_2 0.203 0.00167446
## M_rOX_1 0.199 0.00221961
## MG_FAR_bedamount_0 0.193 0.00533723
## R_FAR_floorsolid_all0_100_100_2_muu1_0 0.176 0.00641463
## R_BR_kuivaliete_12 0.169 0.01688384
## MG_FAR_ind_0no_1rout_2sometimes_2 0.089 0.02093014
## MG_FAR_rootamount_0 0.244 0.04132871
## (-Inf,3] 0.118 0.04887658
## R_BR_kuivaliete_2 -0.169 0.01688384
## M_rOX_0 -0.199 0.00221961
## R_PR_floorsolid_0791_2_1 -0.203 0.00167446
## R_FAR_floorsolid_all0_100_100_2_muu1_1 -0.271 0.00130594
## (3,7] -0.285 0.00105264
## MG_FAR_ind_0no_1rout_2sometimes_0 -0.315 0.00096800
## M_pregAB100_1 -0.221 0.00078632
## R_PR_dirtmed_2 -0.213 0.00073620
## MG_FAR_bedamount_2 -0.309 0.00063319
## MG_FAR_dirtmed_2 -0.224 0.00034839
## MG_PR_kuivaliete_2 -0.235 0.00021086
## M_farAB100_1 -0.239 0.00011417
## MG_PR_rootamount_no_alot_some_HIE -0.270 0.00009645
## M_pregNSAIDS100_1 -0.285 0.00001295
## M_farNSAIDS100_1 -0.274 0.00000448
## MG_PR_bedmatamount_no_alot_enough_some_NIU -0.381 0.00000201
The proportion of variances retained by the different dimensions (axes) can be extracted separately.
eig.val <- get_eigenvalue(res_mca)
head(eig.val,n=10)
## eigenvalue variance.percent cumulative.variance.percent
## Dim.1 0.291 18.8 19
## Dim.2 0.183 11.8 31
## Dim.3 0.124 8.0 39
## Dim.4 0.098 6.3 45
## Dim.5 0.087 5.6 51
## Dim.6 0.075 4.9 55
## Dim.7 0.068 4.4 60
## Dim.8 0.058 3.8 64
## Dim.9 0.051 3.3 67
## Dim.10 0.047 3.0 70
To visualize the percentage of inertia explained by each MCA dimension:
eig.val <- res_mca$eig
barplot(eig.val[, 2],
names.arg = 1:nrow(eig.val),
main = "Variances Explained by Dimensions (%)",
xlab = "Principal Dimensions",
ylab = "Percentage of variances",
col ="steelblue")
# Add connected line segments to the plot
lines(x = 1:nrow(eig.val), eig.val[, 2],
type = "b", pch = 19, col = "red")
Eigenvalues can be used to determine the number of axes to retain. As to my knowledge, there is no “rule of thumb” to choose the number of dimensions to keep for the data interpretation. It depends on the research question and the researcher’s need. The level of satisfaction, e.g.in case of 80% of the total variance explained the number of dimensions necessary to achieve that can be chosen.
The first two express 14% of the total dataset variance meaning that 14% of the individuals or variables total variability is explained by the plane. This is a very small percentage.In addition, there is no clear drop to help to identify how many dimensions should be included in the final interpretation to capture the right number of real information. Dimensions having low scores are likely to be unstable, too.
To further clarify the MCA results graphical representation is used. Firstly, a biplot showing the global pattern within the data is created. Observations are represented by blue points and variables by red triangles and labels. The distance between any observation points or variable points gives a measure of their similarity (or dissimilarity). Similar types of individuals are close on the map, as well as similar kinds of variables.
fviz_mca_biplot(res_mca,
repel = TRUE, # Avoid text overlapping (slow if many point)
ggtheme = theme_minimal())
Variable categories related results can be extracted separately to provide information for the coordinates, the cos2 and the contribution of variable categories:
var$coord: coordinates of variables to create a scatter plot
var$cos2: represents the quality of the representation for variables on the factor map.
var$contrib: contains the contributions (in percentage) of the variables to the definition of the dimensions.
Next, a plot is created to visualize the correlation between variables of the first and second dimension. Basically variable categories with a similar profile are grouped together. Negatively correlated variable categories are positioned on opposite sides of the plot origin (opposed quadrants). The distance between category points and the origin measures the quality of the variable category on the factor map. Category points that are away from the origin are well represented on the factor map. Supplementary quantitative final grade variable is plotted blue.
fviz_mca_var(res_mca, choice = "mca.cor",
repel = TRUE, # Avoid text overlapping (slow)
ggtheme = theme_minimal())
The plot should help to identify variables that are the most correlated with each dimension. The squared correlations between variables and the dimensions are used as coordinates.
It can be seen that, the variables mother´s and father´s education as well as father´s job are the most correlated with dimension 1. Similarly, the variables going out with friends, high alcohol usage and class failures are the most correlated with dimension 2.
It’s possible to change the color and the shape of the variable points as well as the number of top variables, i.e. the ones having the highest contribution.
fviz_mca_var(res_mca, col.var="black", shape.var = 15,
repel = TRUE,select.var = list(contrib = 6))
It is also possible to control the transparency of variable categories according to their contribution values.
# Change the transparency by contrib values
fviz_mca_var(res_mca, alpha.var="contrib",
repel = TRUE,
ggtheme = theme_minimal())
The most contributing, i.e. important variable categories can be visualized by gradient-colouring them respect to their contribution value. Meaning basically, that low, medium and high contributions have different colours.
fviz_mca_var(res_mca, col.var = "contrib",
gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
repel = TRUE, # avoid text overlapping (slow)
ggtheme = theme_minimal()
)
Simple bar plots can also be used to visualize contribution of variable categories. The top 12 variable categories contributing to the first and second dimension:
# Contributions of rows to dimension 1
fviz_contrib(res_mca, choice = "var", axes = 1, top = 12)
# Contributions of rows to dimension 2
fviz_contrib(res_mca, choice = "var", axes = 2, top = 12)
The red dashed line indicates the expected average value, If the contributions were uniform.
For cos2 values it is similarly possible to change the color and the shape of the variable points as well as the number of top variables, i.e. the ones having the highest cos2 values.
fviz_mca_var(res_mca, col.var="black", shape.var = 15,
repel = TRUE,select.var = list(cos2 = 10))
If a variable category is well represented by two dimensions, the sum of the cos2 is closed to one. For some of the row items, more than 2 dimensions are required to perfectly represent the data. Or it’s transparency of the variable categories according to their cos2 values can be controlled.
# Change the transparency by cos2 values
fviz_mca_var(res_mca, alpha.var="cos2",
repel = TRUE,
ggtheme = theme_minimal(),selectMod="cos2 10")
Furthermore, just as with the contributions, variable categories can be gradient-coloured with respect to their cos2 value. Meaning that low, medium and high co2 values have different colours.
# Color by cos2 values: quality on the factor map
fviz_mca_var(res_mca, col.var = "cos2",
gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
repel = TRUE, # Avoid text overlapping
ggtheme = theme_minimal())
Similarly as with the contributions, it is also possible to create a bar plot of variable cos2 importance.
# Cos2 of variable categories on Dim.1 and Dim.2
fviz_cos2(res_mca, n=10,choice = "var", axes = 1:2,top=12)
Individuals can be coloured by groups and a concentration ellipse can be added around each group.
# habillage = external grouping variable
fviz_mca_ind(res_mca, habillage = dfalc$OUT_SOW_mort_dic, addEllipses = TRUE)
# habillage = index of the column to be used as grouping variable
fviz_mca_ind(res_mca, habillage = dfalc$OUT_SOW_cull_dic, addEllipses = TRUE)
fviz_ellipses(res_mca, c("OUT_SOW_cull_dic", "OUT_SOW_mort_dic"),
geom = "point")
fviz_mca_var(res_mca, choice = "quanti.sup",
ggtheme = theme_minimal())
res_mca$quanti
## $coord
## Dim 1 Dim 2 Dim 3 Dim 4 Dim 5
## OUT_SOW_mort_proNUM -0.37 -0.15 0.143 -0.203 -0.10
## OUT_SOW_cull_proNUM -0.41 0.04 -0.017 0.047 0.12
The first dimension aims to characterize individuals with a high positive coordinate on the axis (right) and with a high negative coordinate (left).
Firstly, there are a group of individuals on the right with both mother and father having higher education, mother and father working as a teacher, no class failures and the best performance group. Additionally, they are sharing being active, young, having a mother work in health sector and having family support. On the contrary, there are low frequency scores for mother and father having only elementary level or no education, mother or father work as “other”" or mother being at home and having class failures as well as low frequencies for no activities, belonging to the lowest performance group category, average health group and no family support.
Secondly, there are a group of individuals on the left with class failures one or more, lowest performancegroup, no willingness to higher education, high alcohol consumption and the oldest age category. Additionally, to some extent common are mother having low educational level, going out with friends, mother work as other or have average level education as well as being a male. Low frecuencies are for no class failures, mother and father being high school educated, young age group, mother working as a teacher, best performance group, being a female and having father as a teacher.
Thirdly, there is a group on the left with mother and father having little education, health being average, gender female, low alcohol consumption, mother working at home and father as “other”“, having a positive attitude towards high edution, performing at an almost average level and sometimes going out with friends. Low frequencies are there for mother´s or father´s higher education, mother working as a teacher, being a male, using alcohol, going out a lot, father being a teacher, health being very good, having no ideas about further education and haing some class failures.
The second dimension aims to characterize individuals with a high positive coordinate on the axis (top) and with a high negative coordinate (bottom).
Firstly, there is a group up in the graph having in common one or more class failures, lowest performance group, negative attitude towards higher eduction, high alcohol consumption, age above 17, father´s low education, going out frequently, mother working as “other”, mother´s low education and being a male. Additionally, the group members have low frequencies for no class failures, mother´s and father´s high education, positive attitude towards education, low alcohol consumption, being young, having mother in education, best performance group, being a female and having father in education.
Secondly, there is a group sharing high frequency for mother and father being highly educated, mother and father working as educators, no class failures, performing best, being active and young, mother working in the health sector having family support. In addition there is low frequency for mother´s or father´s low education, jobs as “other”“, mother at home, one or more class failures, no activities, lowest performance group, average health and no family support.
Thirdly, there is a negative co-ordinate group sharing high frequency for the lowest level of education of the mother and the father, average health, being a female, low alcohol usage, mother being at home, father working as “other”, performing middle low, rarely or never going out and having a positive attitude towards education. Low frequencies are common for high education for mother and father, mother being a teacher, being a male, using a lot of alcohol, going out frequently, father working as a teacher, best health group, no positive attitude towards education, one or more failures.
Finally, a classification made on individuals reveals three clusters.
The first cluster has individuals with high frequencies for
and low frequencies for
The second cluster has individuals with high frequencies for
and low frequencies for
And, finally, the third cluster has individuals with high frequencies for
and low frequencies for
The aim of this study was to scrutinize the multidimensional data into a more comprehensible, lower dimensional structure and to reveal some association between different types of respondents. However, the reduction was not completely suitably acchieved as the inertia explained was low and the observations were very scattered. However, there is an indication that some sociodemographic factors have joint effects. It is important to confirm the associations using advanced techniques, e.g. by applying theory of planned behavior to study the relations among personal beliefs, attitudes, behavioral intentions and behaviour and other individual as well as parental features to investigate the risk factors for high alcohol usage. Future investigations need to be done to identify those variables that show significant relationships and to take them forward for further analysis.
References:
https://www.analyticsvidhya.com/blog/2016/03/practical-guide-principal-component-analysis-python/
http://factominer.free.fr/factomethods/categories-description.html
http://factominer.free.fr/factomethods/multiple-correspondence-analysis.html
http://www.gastonsanchez.com/visually-enforced/how-to/2012/10/13/MCA-in-R/
FactoMineR videos and many more